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>
47 #include <tulip/tulipconf.h>
49 #define BUFFER_OFFSET(bytes) ((GLubyte*) NULL + (bytes))
57 class TLP_GL_SCOPE OpenGlConfigManager {
64 static OpenGlConfigManager &getInst();
74 double getOpenGLVersion();
79 std::string getOpenGLVendor();
85 bool isExtensionSupported(
const std::string &extensionName);
90 bool hasVertexBufferObject();
95 void setAntiAliasing(
const bool antialiasing) {
96 antialiased = antialiasing;
103 void activateLineAndPointAntiAliasing();
109 void desactivateLineAndPointAntiAliasing();
115 void activatePolygonAntiAliasing();
120 void desactivatePolygonAntiAliasing();
131 OpenGlConfigManager();
133 static OpenGlConfigManager* inst;
136 bool driversAreChecked;
139 std::map<std::string, bool> checkedExtensions;