openGL blending

Problems with Canvas, OpenGL, etc...

openGL blending

Postby monnti » Sun Mar 27, 2011 7:55 pm


I have a problem with openGL on my htc desire...

When i try to display a transparent object it doesn't work and i'm getting a completely visible one. But if i do the same with the emulator everything works fine...

That is the code for the visualisation:

gl.glColor4f(1, 0.2f, 0, 0.7f);
gl.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY );
gl.glVertexPointer(3, GL11.GL_FLOAT, 0, vertices);
gl.glDrawArrays(GL11.GL_TRIANGLES, 0, 3);

someone has an idea??
Posts: 2
Joined: Sun Mar 27, 2011 7:48 pm


Re: openGL blending

Postby zorro » Thu May 05, 2011 10:01 am

The Desire uses the GPU for rendering your demo but the emulator uses software platform PixelFlinger, so it's not always useful to compare the outputs of the two. In your code you enable TEXTURE_COORD array but you set up the VERTEX_ARRAY pointer, which is not correct. Can you post the entire OnDraw function? The fragment you posted does not clarify your potential problem.
User avatar
Experienced Developer
Experienced Developer
Posts: 71
Joined: Mon Aug 10, 2009 3:11 pm
Location: Romania


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

Who is online

Users browsing this forum: No registered users and 1 guest