From 129b19f69fbbdcd896150aa8faa7f20254169c0c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 26 Apr 2012 21:56:58 +0300 Subject: Add to log draw backend name. Add ability to get free video memory (fast openg with NVIDIA). Add test with id 100 for long perfomance testing. --- src/openglgraphics.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/openglgraphics.h') diff --git a/src/openglgraphics.h b/src/openglgraphics.h index d602f3126..652447447 100644 --- a/src/openglgraphics.h +++ b/src/openglgraphics.h @@ -34,6 +34,8 @@ #include //#include +#include + class OpenGLGraphics : public Graphics { public: @@ -144,6 +146,10 @@ class OpenGLGraphics : public Graphics bool drawNet(int x1, int y1, int x2, int y2, int width, int height); + bool supportExtension(std::string name); + + int getMemoryUsage(); + static void bindTexture(GLenum target, GLuint texture); static GLuint mLastImage; @@ -151,7 +157,9 @@ class OpenGLGraphics : public Graphics protected: void setTexturingAndBlending(bool enable); - void logString(char *format, GLenum num); + void logString(const char *format, GLenum num); + + void updateMemoryInfo(); private: GLfloat *mFloatTexArray; @@ -163,6 +171,8 @@ class OpenGLGraphics : public Graphics GLuint mFboId; GLuint mTextureId; GLuint mRboId; + std::set mExtensions; + GLint mStartFreeMem; }; #endif -- cgit v1.2.3-60-g2f50