Comments on: Adventures in OpenCL Part 2: Particles with OpenGL http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/ casin' the joint since '85 Thu, 03 Mar 2016 20:39:33 +0000 hourly 1 https://wordpress.org/?v=4.4.3 By: Eustachy http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/comment-page-1/#comment-1474 Tue, 22 Nov 2011 09:11:19 +0000 http://enja.org/?p=278#comment-1474 In my application, I had a problem creating shared context under Mac OS X (10.6.8) with CL_INVALID_GL_OBJECT error returned by clCreateFromGLBuffer(). Your example failed to run for the same reason. Turns out it works fine if you create VBO with GL_STATIC_DRAW instead of GL_DYNAMIC_DRAW. Not sure what is the reason, but it seems there is one, because the example I found on developer.apple.com explicitly defines this param as STATIC_DRAW if gl interop is enabled (and uses DYNAMIC_DRAW when gl interop is disabled).

]]>
By: Adventures in PyOpenCL: Part 2, Particles with PyOpenGL | enj http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/comment-page-1/#comment-719 Tue, 22 Mar 2011 21:24:05 +0000 http://enja.org/?p=278#comment-719 […] We accomplish this with two Python modules, PyOpenCL and PyOpenGL. This is a port of my C++ OpenCL tutorial, but with much less code and all the splendors of […]

]]>
By: karimkhan http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/comment-page-1/#comment-592 Thu, 13 Jan 2011 09:05:05 +0000 http://enja.org/?p=278#comment-592 Hi everybody ,
I tried to run the part2.x , but its giving segmenation fault , what should I do ca anyone suggest ,
enja I hope you will do it…

Thanks…

]]>
By: Keith http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/comment-page-1/#comment-589 Wed, 12 Jan 2011 10:47:52 +0000 http://enja.org/?p=278#comment-589 Nice tutorials so far. Have you considered getting into PyOpenCL?

]]>
By: Garet http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/comment-page-1/#comment-551 Tue, 28 Dec 2010 11:04:31 +0000 http://enja.org/?p=278#comment-551 oh btw, i linked to:
libopengl32.a
libglu32.a
libfreeglut.a
OpenCL.lib

in that order

also i changed the top of part2.cpp to look like:

#define GLUT_DISABLE_ATEXIT_HACK
#define GLEW_STATIC

#include <windows.h>
//OpenGL stuff
#include <glew.c>
#if defined __APPLE__ || defined(MACOSX)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include <GL/gl.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstdlib>
#include <sstream>
#include <iomanip>
#include <math.h>
#include <vector>
#include "cll.h"
#include "util.h"
#include <string>
#include <string.h>

and i removed any place i saw includes being recalled that i could find based on that order.

the top of main.cpp just looks like:
#include "part2.cpp"

#define NUM_PARTICLES 20000
CL* example;

etc,…

and maybe the more important thing with glew is that i just went ahead and cheated and plopped the glew.c file into mingw/include and glew.h into mingw/include/GL
and then just #include<glew.c> to avoid some strange link errors ^_^;;

glew.h should be at top of glew.c ala
#include <GL/glew.h>
#if defined(_WIN32)
# include <GL/wglew.h>
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
# include <GL/glxew.h>
#endif

which i think should shed some light on that glx business.. prolly related to GLEW_APPLE_GLX

]]>
By: Garet http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/comment-page-1/#comment-549 Tue, 28 Dec 2010 10:49:09 +0000 http://enja.org/?p=278#comment-549 Got it up and running in Code::Blocks on Windows 7 x64 with MinGW

Thanks much =D Will be very helpful in conceptualizin’ opencl

]]>
By: Calin http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/comment-page-1/#comment-386 Wed, 24 Nov 2010 09:46:09 +0000 http://enja.org/?p=278#comment-386 Thanks for sharing your knowledge. Great tutorial.
I tested it on Ubuntu 10.04 with ATI 4650, StreamSdk 2.2 and it perfectly works.

]]>
By: enj http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/comment-page-1/#comment-291 Tue, 14 Sep 2010 22:19:50 +0000 http://enja.org/?p=278#comment-291 @Patrick,
Thanks for the feedback, unfortunately I don’t have a Windows machine handy to test with, but I did check and glx.h is not necessary on Windows (this pertains to functions on linux to get the OpenGL context).
You should be able to link to those standard OpenGL libraries, is NetBeans using the CMakeLists.txt file or does it have its own build system?

At some point I’ll be testing everything on Windows, but right now my time is focused on my thesis project (which is where the knowledge for these tutorials comes from) so unfortunately I can’t help just yet.

]]>
By: Patrick A. http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/comment-page-1/#comment-286 Fri, 10 Sep 2010 21:55:42 +0000 http://enja.org/?p=278#comment-286 Really great tutorial! I’m trying to compile your source code under Netbeans 6.9.1 for Windows 7 but it seems that the file GL/glx.h is missing. What is this file used for? Also, which libraries are you linking your GLUT and OpenGL things to, as I am failing to link the source code to the standard libraries (Glew32.lib, Glu32.lib, OpenGL32.lib and Glut32.lib)…
Thanks,

]]>
By: blenderificus http://enja.org/2010/08/27/adventures-in-opencl-part-2-particles-with-opengl/comment-page-1/#comment-266 Mon, 30 Aug 2010 09:40:35 +0000 http://enja.org/?p=278#comment-266 thanks for sharing more insigt into programming particles for openCL. Cant wait for your work to make in into trunk!

]]>