I've tried GLee. That doesn't work because my program is multithreaded and GLee doesn't support that (it looks for LIBC.lib and cannot find it as it is long deprecated).
I've tried GLEW. All the VBO-related functions fail. In my WM_CREATE: once the program reaches the first VBO command (glGenBuffers()) the program is blocked and I get a blank window.
Is there any alternate way to get VBO's working? gl.h/glu.h only support up to GL_VERSION_1_1 and VBO's need 1.5.
PLEASE help I've been stuck with this problem for so many days now...
OpenGL VBO beginner's problem
Started by Tyler B, Aug 02 2011 04:26 PM
4 replies to this topic
Ad:
#3 Members - Reputation: 100
Posted 02 August 2011 - 05:05 PM
Thanks for the reply Katie. No I wasn't calling glewInit() before calling the VBO functions. However, adding it in seems to make no difference. Do you want to see the code?
To clarify, even with glewInit() at the top of my WM_CREATE: the first VBO function (glGenBuffers()) doesn't return.
To clarify, even with glewInit() at the top of my WM_CREATE: the first VBO function (glGenBuffers()) doesn't return.
#4 Moderators - Reputation: 4633
Posted 02 August 2011 - 06:37 PM
The WM_CREATE message is sent from inside CreateWindow, so there is no chance you have set up the pixel format and the rendering context before the message is sent. You can do it within the message handler, but since you say you call glewInit at the top, the problem is that you have not yet created a rendering context; you must do that first.
#5 Members - Reputation: 100
Posted 02 August 2011 - 06:52 PM
You, sir, are a saviour. Now my program is, well....running
not properly (I'll sort it out) but thanks now it actually renders!
My pixel format code/rendering context was after glewInit and the VBO stuff, so moving it to the top fixed it.







