diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2013-03-04 22:38:40 +0000 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2013-03-04 22:38:40 +0000 |
commit | fc4daa1fe40d0127dbd1e9fdbd4031bade1f7522 (patch) | |
tree | 7201ac0bb6e1abd171e92b97b0d2347cffc4f0ce /src/boring_parts.cpp | |
parent | 35e25937ad05e409340e7cd356c3ce1a45a5a3f9 (diff) | |
download | 2013-gpudataviz-fc4daa1fe40d0127dbd1e9fdbd4031bade1f7522.tar.gz 2013-gpudataviz-fc4daa1fe40d0127dbd1e9fdbd4031bade1f7522.tar.bz2 2013-gpudataviz-fc4daa1fe40d0127dbd1e9fdbd4031bade1f7522.zip |
Ok, première version qui affiche le mesh correctement initializé avec OpenCL et qui affiche même un sinus radial sur un clic de souris mouse1.
Reste a capturer les evenements mouse wheel et/ou clavier.
git-svn-id: file:///var/svn/2013-gpudataviz/trunk@19 371a6b4a-a258-45f8-9dcc-bdd82ce0ac9d
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; - -} - |