diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2013-03-03 13:56:50 +0000 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2013-03-03 13:56:50 +0000 |
commit | dcbaaf5bb09caf07f27c03f3c3db196542668b4a (patch) | |
tree | 3d74622e716c3bc58ceeefdb422c5c1c68b4e4a9 /src/boring_parts.hpp | |
parent | 8c587d2243884d85bbe5fadac64258ac246617b4 (diff) | |
download | 2013-gpudataviz-dcbaaf5bb09caf07f27c03f3c3db196542668b4a.tar.gz 2013-gpudataviz-dcbaaf5bb09caf07f27c03f3c3db196542668b4a.tar.bz2 2013-gpudataviz-dcbaaf5bb09caf07f27c03f3c3db196542668b4a.zip |
Standardisation des extensions.
Avancee sur l'initialisation des VBO mais je galere a trouver un (bon) moyen de charger les fonctions OpenGL qui vont bien.
git-svn-id: file:///var/svn/2013-gpudataviz/trunk@17 371a6b4a-a258-45f8-9dcc-bdd82ce0ac9d
Diffstat (limited to 'src/boring_parts.hpp')
-rw-r--r-- | src/boring_parts.hpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/boring_parts.hpp b/src/boring_parts.hpp new file mode 100644 index 0000000..b4cd58d --- /dev/null +++ b/src/boring_parts.hpp @@ -0,0 +1,27 @@ +#include <iostream> + +#include <gtkmm.h> /* Must included before X11/Xlib.h */ +//#include <GL/glew.h> /* Seems included by GL/glxew.h */ +//#include <GL/glxew.h> /* For GLXContext, must appear before gl.h, includes X11/Xlib.h */ +#include <gtkglmm.h> /* Includes a GL/gl.h (the right one ??) */ + +//#include <GL/gl.h> +#include <GL/glu.h> +//#include <CL/cl_gl.h> + +int initLibs(); + +#ifdef HAS_OPENCL +#include <CL/opencl.h> +int initOpenCL(intptr_t gl_display, intptr_t gl_context, intptr_t gl_vbo); +#else +// Quick and dirty cl_float4 replacement +typedef union { + float s[4]; + struct{ float x, y, z, w; }; + struct{ float s0, s1, s2, s3; }; +} cl_float4; +#endif /*HAS_OPENCL*/ + +bool updateGLProjectionMatrix(Glib::RefPtr<Gdk::GL::Context> glCtx, Glib::RefPtr<Gdk::GL::Window> glWin, int width, int height); + |