opengl - Do VBOs boost performance even when all data changes frequently -
i'm doing 2d turn based rts game 32x32 tiles (400-500 tiles per frame). use vbo this, may have change vbo data each frame, background scrolling 1 , visible tiles change every time map scrolls. using vbos rather client side vertex arrays still yield performance benefit here? if using vbos data format efficient (float, or int16, or ...)?
if scrolling, can use vertex shader manipulate position rather update vertices themselves. pass in 'scroll' value uniform background , add value x
(or y
, or whatever applies case) value of each vertex.
update:
if intend modify vbo often, can tell driver using usage
param of glbufferdata
. page has description of how works: http://www.opengl.org/wiki/vertex_buffer_object, under accessing vbos. in case, looks should specify gl_dynamic_draw
glbufferdata
driver puts vbo in best place in memory application.
Comments
Post a Comment