i have a program that does some GPU computing with Optional OpenGL rendering.
The use dynamic is as follow:
- init function (init GLEW being the most relevant).
- load mesh from file to GPU (use glGenBuffers are related functions to make VBO).
- process this mesh in parallel (GPU Computing API).
- save mesh into file.
my problem is that when mesh is loading i use opengl calls and wihout context created i just
get segmentation fault.
Edit: Evolution of the problem:
- I was missing GL/glx.h I thought that GL/glxew.h included it, thanks to the answers that got fixed.
- I was missing glXMakeCurrent; and therefore it was having zero contexts.
- After this fixes, it works :).
also thanks for the tools suggestions, i would gladly use them it is just that i needed the low level code for this particular case.
Don’d do it.
glxewis used for loading glx functions. You probably don’t need it.If you want to use GLEW, replace
GL/gl.hwithGL/glew.hleaveGL/glx.has it is.X11 and GLX are quite complex, consider using sdl of glfw instead.