java - Switching from OpenGL ES 1.0 to 2.0 -


i have been developing android app using opengl 1.0 quite time using naive approach rendering, making call glcolor4f(...) , gldrawarrays(...) floatbuffers each frame. hitting point graphics becoming huge bottleneck add more ui elements , number of draw calls increases.

so i'm looking best way group of these calls 1 (or 2 or three) draw calls. looks cleanest, efficient , canonical way use vbo objects, available opengl es 2.0 on. however, require huge refactoring on part switch whole graphics backend es 1.0 es 2.0. not sure if decision, or if there acceptable ways group drawing calls in 1.0 work fine relatively simple 2d data (squares, rounded rectangle triangle_fans, etc.), or if might worth biting bullet , making switch. might mention have heavy reliance on translation , scaling convenient fixed pipeline of es 1.0.

looking around, surprised find no people in position, talking tradeoffs , complexity @ hand such switch. thought?

i have heavy reliance on translation , scaling

note can't batch if change model-view matrix between drawcalls. (es2 didn't change that).

vbo available opengl es 1.1. , available device targeting. even es1.0 (arb_vertex_buffer_object)

you can create big vbo world space geometry (=resolve scaling , translation cpu) , draw that. if update vbo each frame, in experience, it's fast enough. send thousands of small drawcalls slowest.

moving fixed pipline full vertex/fragment shader pipline not easy @ all. require amount of knowledge in 3d. careful. write prototype first. (world-space or object-space lighting ? how transform normals ? ...)

vivien


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -