summaryrefslogtreecommitdiff
path: root/src/openglgraphics.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-02 17:17:02 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-02 17:58:42 +0300
commit1933978cb800c2348e8891c69b28e85c9417b32d (patch)
tree955fc9530dcd4ed4ecb60ad9c38e213c77610d6d /src/openglgraphics.h
parent2f3a3d08b0ba71972e20ae639a2077e9d4d17b94 (diff)
downloadmv-1933978cb800c2348e8891c69b28e85c9417b32d.tar.gz
mv-1933978cb800c2348e8891c69b28e85c9417b32d.tar.bz2
mv-1933978cb800c2348e8891c69b28e85c9417b32d.tar.xz
mv-1933978cb800c2348e8891c69b28e85c9417b32d.zip
Use FBO for screenshots. Disabled for windows.
Diffstat (limited to 'src/openglgraphics.h')
-rw-r--r--src/openglgraphics.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/openglgraphics.h b/src/openglgraphics.h
index 02d628af0..650ad668a 100644
--- a/src/openglgraphics.h
+++ b/src/openglgraphics.h
@@ -28,9 +28,11 @@
#include "main.h"
#include "graphics.h"
-#define NO_SDL_GLEXT
+//#define NO_SDL_GLEXT
+#define GL_GLEXT_PROTOTYPES 1
#include <SDL_opengl.h>
+//#include <GL/glext.h>
class OpenGLGraphics : public Graphics
{
@@ -138,6 +140,8 @@ class OpenGLGraphics : public Graphics
*/
SDL_Surface *getScreenshot();
+ void prepareScreenshot();
+
bool drawNet(int x1, int y1, int x2, int y2, int width, int height);
static void bindTexture(GLenum target, GLuint texture);
@@ -154,6 +158,9 @@ class OpenGLGraphics : public Graphics
bool mAlpha, mTexture;
bool mColorAlpha;
bool mSync;
+ GLuint mFboId;
+ GLuint mTextureId;
+ GLuint mRboId;
};
#endif