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))
53 class OpenGlErrorViewer;
59 class TLP_GL_SCOPE OpenGlConfigManager {
66 static OpenGlConfigManager &getInst();
71 OpenGlErrorViewer *setErrorViewer(OpenGlErrorViewer *errorViewer);
81 double getOpenGLVersion();
86 std::string getOpenGLVendor();
92 bool isExtensionSupported(
const std::string &extensionName);
97 bool hasVertexBufferObject();
102 void setAntiAliasing(
const bool antialiasing) {
103 antialiased = antialiasing;
110 void activateLineAndPointAntiAliasing();
116 void desactivateLineAndPointAntiAliasing();
122 void activatePolygonAntiAliasing();
127 void desactivatePolygonAntiAliasing();
138 OpenGlConfigManager();
140 static OpenGlConfigManager* inst;
142 OpenGlErrorViewer *errorViewer;
145 bool driversAreChecked;
148 std::map<std::string, bool> checkedExtensions;