diff options
Diffstat (limited to 'src/boring_parts.cpp')
-rw-r--r-- | src/boring_parts.cpp | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/boring_parts.cpp b/src/boring_parts.cpp deleted file mode 100644 index 447ae60..0000000 --- a/src/boring_parts.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "boring_parts.hpp" - -// TODO : only need OpenGL things, not GTK ones for now -//#include "gtk_includes.hpp" - -/* From http://stackoverflow.com/questions/4317062/opengl-how-to-check-if-the-user-supports-glgenbuffers -#ifdef WIN32 - #include <windows.h> - #define glGetProcAddress(a) wglGetProcAddress(a) -#endif -#ifdef X11 - #define glGetProcAddress(a) glXGetProcAddress ( \ - reinterpret_cast<const unsigned char*>(a) \ - ) -#endif - -#ifndef GetExtension - #define GetExtension(Type, ExtenName) \ - ExtenName = (Type) \ - glGetProcAddress(STRINGIFY(ExtenName)); \ - if(!ExtenName) \ - { \ - std:cout << "Your Computer Does Not " \ - << "Support GL Extension: " \ - << STRINGIFY(ExtenName) \ - << std::endl; \ - exit(1); \ - } \ - else \ - { \ - std::cout << "Loaded Extension: " \ - << STRINGIFY(ExtenName) \ - << std::endl; \ - } -#endif -*/ - -bool updateGLProjectionMatrix(Glib::RefPtr<Gdk::GL::Context> glCtx, Glib::RefPtr<Gdk::GL::Window> glWin, int width, int height) { - - GLdouble aspect = (GLdouble) width/height; - - // *** OpenGL BEGIN *** - if (!glWin->gl_begin(glCtx)) return false; - - glViewport(0, 0, width, height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(60.0, aspect, 0.1, 10.0); - glMatrixMode(GL_MODELVIEW); - - glWin->gl_end(); - // *** OpenGL END *** - - return true; - -} - |