Skip to main content
GameDev.net gamedev.net
🔒 Locked

Get texture coordinates from VBO

Started by Vorel512 Apr 10, 2012 at 8:51 AM 3 replies 1.9k views
Original Post
Vorel512
Vorel512
Hi experts!

I would like to know how can I extract texture coordinates from VBO.
I know that I can rewrite using setbuffersubdata, but I do not know how to get the existing values from the VBO.

Any help appreciated!!!
JoJoSim1
JoJoSim1
Hi

maybe there is a way to get VBOs content but thats not the way you should do it. For example the iPhone buffers opengl es commands und renders later. If you call get commands rendering must be forced. This means a performance drop.
For dynamic data i leave a copy in main memory.
Vorel512
Vorel512
I do the same, but if there is a way to hold only one "copy" of the objects, I would like to know.
BTW, thanx for the reply!
Dario Oliveri
Dario Oliveri
If you stream your VBO i think it is held only in main memory (don't think OpenGL spec say that, so probably it is to drivers implementors). For devices wich have only 1 memory that should not be a problem causing heavy performance drop. anyway 2 copies are very usefull if you want to change data in the second copy with a thread, while with only 1 that's not possible. You can still hold 2 copies and stream a different copy every frame (depending on your needs)
Peace and love, now I understand really what it means! Guardian Angels exist! Thanks!
JoJoSim1
JoJoSim1
I don't know how Android handles it but on iOS openGLES runs in second thread! As DemonRad said this is the problem. iOS gathers opengl commands and renders if the commandbuffer is full or if flush is called. For best performance you keep the rendering decisions up to the openGLES thread and never call flush. But there are several other commands like get... that internally need to flush. Also streaming which actually uses one "memory" needs to flush. And this leads to not optimal rendering in the openGLES thread thus to a performance drop.
To understand that better google tile based deferred rendering (TBDR)
http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/OpenGLESPlatforms/OpenGLESPlatforms.html
Does anyone how Android is doing that ?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.