Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

OpenGL VBO beginner's problem


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Tyler B   Members   -  Reputation: 100

Like
0Likes
Like

Posted 02 August 2011 - 04:26 PM

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...

Ad:

#2 Katie   Members   -  Reputation: 1083

Like
0Likes
Like

Posted 02 August 2011 - 04:45 PM

"I've tried GLEW. All the VBO-related functions fail."

You have called glewInit() before calling them?

#3 Tyler B   Members   -  Reputation: 100

Like
0Likes
Like

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.

#4 Brother Bob   Moderators   -  Reputation: 4633

Like
1Likes
Like

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 Tyler B   Members   -  Reputation: 100

Like
0Likes
Like

Posted 02 August 2011 - 06:52 PM

You, sir, are a saviour. Now my program is, well....running :P 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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS