21 #ifndef Tulip_OPENGLCONFIGMANAGER_H
22 #define Tulip_OPENGLCONFIGMANAGER_H
32 #if defined(__APPLE__)
33 #include <OpenGL/gl.h>
34 #include <OpenGL/glu.h>
38 # if defined(__WIN32__)
39 # include <GL/glext.h>
43 #include <tulip/tulipconf.h>
45 #define BUFFER_OFFSET(bytes) ((GLubyte*) NULL + (bytes))
53 class TLP_GL_SCOPE OpenGlConfigManager {
60 static OpenGlConfigManager &getInst();
70 double getOpenGLVersion();
75 std::string getOpenGLVendor();
81 bool isExtensionSupported(
const std::string &extensionName);
86 bool hasVertexBufferObject();
91 void setAntiAliasing(
const bool antialiasing) {
92 antialiased = antialiasing;
99 void activateLineAndPointAntiAliasing();
105 void desactivateLineAndPointAntiAliasing();
111 void activatePolygonAntiAliasing();
116 void desactivatePolygonAntiAliasing();
127 OpenGlConfigManager();
129 static OpenGlConfigManager* inst;
132 bool driversAreChecked;
135 std::map<std::string, bool> checkedExtensions;