From dcbaaf5bb09caf07f27c03f3c3db196542668b4a Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sun, 3 Mar 2013 13:56:50 +0000 Subject: 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 --- src/boring_parts.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/boring_parts.hpp (limited to 'src/boring_parts.hpp') 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 + +#include /* Must included before X11/Xlib.h */ +//#include /* Seems included by GL/glxew.h */ +//#include /* For GLXContext, must appear before gl.h, includes X11/Xlib.h */ +#include /* Includes a GL/gl.h (the right one ??) */ + +//#include +#include +//#include + +int initLibs(); + +#ifdef HAS_OPENCL +#include +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 glCtx, Glib::RefPtr glWin, int width, int height); + -- cgit v1.2.3