c++ - Can I switch from glDrawArrays to using Vertex Buffer Objects? -


I have an OpenGL 1.1 ES2D phantom engine, which is based on a GL-TRIANGLE_FAN per phantom. The main presentation code that is called per-phant is per-frame as follows:

  Zero draw (bitmap image * image, low * corner, float * texas, color mark and colormap, Tint xdev, tint yDest, tint aalpha) {glPushMatrix (); GlLoadIdentity (); Globinated (GL_TEXTURE_2D, textured ID); GlVertexPointer (3, GL_SHORT, 0, corner); GlTexCoordPointer (2, GL_FLOAT, 0, Texas); GlColorPointer (RGBA_BYTES, GL_UnSIGNED_BYTE, 0, colorMap.GetMap ()); TFloat scaleX, scaleY; IIMAG-> GetScale (Scale X, Scaly); GlTranslatef (float) xDest, (float) yDest, 0.0f); GlScalef (scaleX, scaleY, 1.0f); GlRotatef (target-> getRotAngle (), 0.0f, 0.0f, 1.0f); Glaudrares (GL_TRIANGLE_FAN, 0, 4); GlPopMatrix (); }  

I am told that switching to Vertex buffer objects (VBO) will increase the rendering performance significantly, so I want to do this. Thus far my research motivates me with many examples showing how to set up different top, color and texture offset buffers, but good examples of how to interfere this data are more elusive. For example, 'I'm pretty sure that I want to present with VBO my top figures like this:

  Glanbuffers (1, and batchbuffarh); Globind Buffer (GL_ARRAIBUFFER, BatchBufferHandle); GlobeFedata (GL_ARRAY_BUFFER, Datasys, Data, GLSACTDDRAW); GlVertextPointer (3, GL_SHORT, 0, 0); GlDrawElements (..., 0); Glubbind Buffer (GL_ARRAY_BUFFER, 0); GlDeleteBuffers (1, and batchfingerhands);  

Apparently I generate and bond similar buffers for texture coordinates and vertical color data, even though how do I make 100% clear how those settings differ.

My understanding is that by increasing the speed, these triangle fans will be presented in a "drag-call", but what is a "attracted call" in this context? Using this method, drillings () are sometimes called so that it does not ...?

Whatever it may be, it will mean that I have to generate VBO (or three) for a bunch of Sprites, there are all the data in the series, it can be very difficult for me, whose legacy code is my Working with, but I need to translate, scale, and rotate the spread of each person. Where does the data go to VBO (S)?

My conclusion is thus helpful in only one case, using remote VBOs, but complex objects. It will appear that what I want to do is not possible - to provide OpenGL with the list of sprites (with each top, color, texture map, scale, rotation and translation information for each).

Is my assessment correct or is there a way to do it (OpenGL ES 1.1)?


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -