• Advertisement
Sign in to follow this  

A more efficient glVertex*

This topic is 3626 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

Hi guys. I read that it is more efficient for the GPU to be given large batches of data to draw. I wanted to know, is it more efficient to call glVertexfv than glVertex3f?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Firecore
Hi guys.
I read that it is more efficient for the GPU to be given large batches of data to draw.
I wanted to know, is it more efficient to call glVertexfv than glVertex3f?


You probably don't want to use any of the immediate mode commands--they are far too slow. You should look into vertex arrays and Vertex Buffer Objects for supplying geometry to your GPU.

Share this post


Link to post
Share on other sites
Quote:
Original post by mhamlin
You probably don't want to use any of the immediate mode commands--they are far too slow. You should look into vertex arrays and Vertex Buffer Objects for supplying geometry to your GPU.


hi.
um i saw the site.
but how do i use the function?

Share this post


Link to post
Share on other sites
hi.
saw the turorial.
it was pretty good.
i wanted to kno, is it efficient 2 update the vbo every frame?

Share this post


Link to post
Share on other sites
Efficiency is a relative term. If you are supplying the same data each time, then no, and it's also pointless. If it is necessary to update it each frame with different values then you have little other alternative.

Share this post


Link to post
Share on other sites
Quote:
Original post by Firecore
hi.
saw the turorial.
it was pretty good.
i wanted to kno, is it efficient 2 update the vbo every frame?


In that case I recommend 2 VBOs. One from which you render and one that you update. On the next frame, switch the VBOs around.

Share this post


Link to post
Share on other sites
Quote:
Original post by V-man
Quote:
Original post by Firecore
hi.
saw the turorial.
it was pretty good.
i wanted to kno, is it efficient 2 update the vbo every frame?


In that case I recommend 2 VBOs. One from which you render and one that you update. On the next frame, switch the VBOs around.


aahhh.
i see.
thanx guys.
uve been a big help

Share this post


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

  • Advertisement