stop redrawing

Problems with Canvas, OpenGL, etc...

stop redrawing

Postby monnti » Fri Apr 08, 2011 5:22 pm

hi,

i have a problem with the preformace of my opengl app. The main problem is that i have to redraw many static objects. is there a way to redraw only the changing objects and not the whole screen???


i have tried this:


Code: Select all
if(!hasInit){
         gl.glClear( GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT );
         backgroundRenderer.update(gl, activity, simulation);
         hasInit = true;
      }
      
      gl.glEnable(GL10.GL_SCISSOR_TEST);
      gl.glScissor(0, 0, 150, 150);
      gl.glClear( GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT );
      
      backgroundRenderer.update(gl, activity, simulation);
      boxRenderer.update(gl, activity, simulation);
      
      gl.glDisable(GL10.GL_SCISSOR_TEST);



but now I have weird flashing effects, except in the defined glScissor area.
monnti
Freshman
Freshman
 
Posts: 2
Joined: Sun Mar 27, 2011 7:48 pm

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 3 guests