diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-26 21:56:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-26 21:56:58 +0300 |
commit | 129b19f69fbbdcd896150aa8faa7f20254169c0c (patch) | |
tree | dd15d89fa3d6422139a0ba41a22f6f4db3f8b5ee /src/openglgraphics.h | |
parent | 5f5ea46910feefc212a98ea715b0d4b0d9d4bc23 (diff) | |
download | mv-129b19f69fbbdcd896150aa8faa7f20254169c0c.tar.gz mv-129b19f69fbbdcd896150aa8faa7f20254169c0c.tar.bz2 mv-129b19f69fbbdcd896150aa8faa7f20254169c0c.tar.xz mv-129b19f69fbbdcd896150aa8faa7f20254169c0c.zip |
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.
Diffstat (limited to 'src/openglgraphics.h')
-rw-r--r-- | src/openglgraphics.h | 12 |
1 files changed, 11 insertions, 1 deletions
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 <SDL_opengl.h> //#include <GL/glext.h> +#include <set> + 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<std::string> mExtensions; + GLint mStartFreeMem; }; #endif |