diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-14 15:13:54 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-14 15:13:54 +0000 |
commit | 4f6c1dad35e575588b73524692d973dec06447c3 (patch) | |
tree | d052c3c7db66450888af132ac9dcefb7c28b58a6 /src/main.cpp | |
parent | ebccde5d779f25584386ddc0c4bdc6331877bcc6 (diff) | |
download | mana-4f6c1dad35e575588b73524692d973dec06447c3.tar.gz mana-4f6c1dad35e575588b73524692d973dec06447c3.tar.bz2 mana-4f6c1dad35e575588b73524692d973dec06447c3.tar.xz mana-4f6c1dad35e575588b73524692d973dec06447c3.zip |
Support for drawing using OpenGL. Don't expect it to be fast yet though.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 805bb7f6..043be40d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,6 +35,10 @@ #include <SDL.h> #include <libxml/xmlversion.h> +#ifdef USE_OPENGL +#include <SDL_opengl.h> +#endif + #ifdef __USE_UNIX98 #include <sys/stat.h> #include <pwd.h> @@ -224,6 +228,10 @@ void init_engine() // Setup OpenGL glViewport(0, 0, 800, 600); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + int gotDoubleBuffer; + SDL_GL_GetAttribute(SDL_GL_DOUBLEBUFFER, &gotDoubleBuffer); + log("OpenGL is %s double buffering.", + (gotDoubleBuffer ? "using" : "not using")); #endif const SDL_VideoInfo *vi = SDL_GetVideoInfo(); |