Jump to content
  • Advertisement
Sign in to follow this  
ManaStone

OpenGL Do you have to define each vertex every time you render a model?

This topic is 5086 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I’m new do OpenGL and I’ve noticed that in the example programs I’ve seen vertices are created every time you render a model. Is this how all models are rendered? There has got to be a faster way to do this. I know in DirectX that you use a vertex buffer. Is there anything equivalent to that in OpenGL? I just can’t image a game being implemented where all the vertices are defined every frame.

Share this post


Link to post
Share on other sites
Advertisement
What you're talking about is immediate mode, which is by far the slowest method. You should look into vertex arrays and display lists, both of which are part of standard OpenGL. The fastest method is via the VBO extension (vertex buffer object), which is essentially a vertex array in GPU memory.

Share this post


Link to post
Share on other sites
Everyone always wants a tutorial [smile]. IMO you'll learn a lot more by just reading the relevant parts of the red and blue books (see the Forum FAQ for online versions).

The best docs on VBO are in the extension spec. It even includes a few examples. Again, the Forum FAQ has the link to the extension registry. BTW, don't attempt VBO until you understand vertex arrays, since the former is an extension of the latter.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by ManaStone
Thx, do You know of any tutorials that demonstrate this?

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=45

Share this post


Link to post
Share on other sites
Quote:
Original post by ManaStone
Is there any way of doing skeletal animation without using extentions?
You'd use vertex arrays instead of vertex objects. The redbook gives you a good description of how to do it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!