Hi,

i was playing around with OpenGL on my HTC Hero (latest OS version)
and i think i found a bug. Here's the situation: I have the following
triangle

                mesh = application.newMesh( 3, false, false, true, false, 0, 
true );
                mesh.texCoord( 0, 0 );
                mesh.vertex( -0.5f, -0.5f, 0 );
                mesh.texCoord( 1, 0 );
                mesh.vertex( 0.5f, -0.5f, 0 );
                mesh.texCoord( 0.5f, 1 );
                mesh.vertex( 0, 0.5f, 0 );

basic setup, uses a VBO with vertex position and texture coordinates
components. Additionally i load 2 textures. For rendering i set the
projection matrix to identity so i have a basic 2D setup with the x
and y axis each spaning the interval [-1,1]. I render the mesh once
with texture 1 and a second time displaced by 0.5 on the x axis with
the second texture. Additionally i set the texture matrix to identity
for the first triangle rendering and for the second i gradually
increase the displacement in u. The rendering code looks as follows
(methods call equivalent opengl procedures):

        @Override
        public void render(GraphicApplication application) {
                application.clear( true, true, false );


                application.setMatrixMode(MatrixMode.ModelView);
                application.loadIdentity();
                application.translate(0.5f, 0, 0 );
                texture1.bind();
                application.setMatrixMode( MatrixMode.Texture );
                application.loadIdentity();
                application.translate(t, 0, 0);

                mesh.render( PrimitiveType.Triangles );

                application.setMatrixMode(MatrixMode.ModelView);
                application.loadIdentity();

                texture2.bind();
                application.setMatrixMode( MatrixMode.Texture );
                application.loadIdentity();
                mesh.render( PrimitiveType.Triangles );
                t += 0.001;
        }

The effect is that the texture on the second triangle is moving to the
left. Texture wrap is set to WRAP in u and v, texture filters are set
to LINEAR. The code works as expected on all emulators i setup for all
OS versions. However, it does not work on my HTC Hero with the latest
OS update. The texture matrix is not set to identity for the second
triangle and i  can't figure out what is wrong. Again, the same code
works perfectly fine in the emulator.

Did anyone else stumble across this bug? Is there a solution to it? It
would be a big show stopper for me as i need to rely on proper texture
matrix manipulation.

Thanks in advance,
Mario

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to