21 #ifndef Tulip_QGLBUFFERMANAGER_H
22 #define Tulip_QGLBUFFERMANAGER_H
26 #include <tulip/tulipconf.h>
29 class QGLFramebufferObject;
36 class TLP_QT_SCOPE QGlBufferManager {
43 static QGlBufferManager &getInst() {
45 inst=
new QGlBufferManager();
50 static void clearBuffers();
55 bool canUsePixelBuffer() {
56 return pixelBufferWork;
62 bool canUseFramebufferObject() {
63 return framebufferObjectWork;
69 QGLPixelBuffer *getPixelBuffer(
int width,
int height);
74 QGLFramebufferObject *getFramebufferObject(
int width,
int height);
83 static QGlBufferManager* inst;
85 std::map<std::pair<int,int>,QGLPixelBuffer*> widthHeightToBuffer;
86 std::map<QGLPixelBuffer*,std::pair<int,int> > bufferToWidthHeight;
87 std::map<std::pair<int,int>,QGLFramebufferObject*> widthHeightToFramebuffer;
88 std::map<QGLFramebufferObject*,std::pair<int,int> > framebufferToWidthHeight;
91 bool framebufferObjectWork;
97 #endif // Tulip_QGLBUFFERMANAGER_H