You are not logged in.
I am writing a little test application which is more or less just meant for learning and developing some of the underlying classes. I have recently decided to try replacing the immediate mode rendering with Vertex Buffer Objects. Since VBO's have been part of core OpenGL since 1.5, this should be no problem. Unfortunately, it does seem to be a problem, as the program crashes on the call to glBindBuffer. According to the debugger, it's a segmentation fault, which doesn't tell me much. I'm not sure what is going on, but I know my laptop supports well over OpenGL 1.5. ( I have up to OpenGL 2.1 until the Mesa libraries and ATI drivers get updated to allow OpenGL 3.2 on my card )
I am using SDL 1.2 with OpenGL.
Some code snippets of the VBO code.
GLuint *VBOID;
...
glGenBuffers(1, VBOID); // Works fine
...
glBindBuffer(GL_ARRAY_BUFFER, *VBOID); //Crashes on this line
Last edited by Katherine1 (2012-07-04 15:27:02)
Offline
GLuint vboid;
glGenBuffers(1, &vboid);
glBindBuffer(GL_ARRAY_BUFFER, vboid);
Your vboid is currently pointer, is it allocated? If it isn't your code makes no sense at all and it's miracle it doesn't crash on gen call.
Also, gdb will tell you more if you read the documentation
Last edited by Cloudef (2012-07-04 15:14:02)
Offline
That was the problem. Everything is working fine now. Thanks!
Offline