Get texture coordinates from VBO

Started by
3 comments, last by JoJoSim1 11 years, 11 months ago
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!!!
Advertisement
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.
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!
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!

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 ?

This topic is closed to new replies.

Advertisement