• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps glDrawTexiOES texture flipped

blither

Newbie
I am currently trying just to get my texture to display on the background with only some luck. Currently my screen displays the texture but it displays it upside-down. And it appears to be the entire screen is inverted vertically; because when I move the image in moves the image in the opposite direction.

I have my look at projection like...

Code:
GLU.gluLookAt(gl, 0.0f, 0.0f, 5f,
                0.0f, 0.0f, 0.0f,
                0.0f, 1.0f, 0.0f);

My main issue is when I tried rendering a texture with verteces it rendered fine.

Any ideas?
 
Here is what I am using to render

Code:
        gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);

        gl.glEnable(GL10.GL_BLEND);
        gl.glColor4x(0x10000, 0x00000, 0x10000, 0x10000)
        
        int[] cropRect={0,0,256,256};
        gl.glFrontFace(GL10.GL_CW);
        ((GL11)gl).glTexParameteriv(GL10.GL_TEXTURE_2D,
                GL11Ext.GL_TEXTURE_CROP_RECT_OES, cropRect, 0);
        ((GL11Ext) gl).glDrawTexiOES(0, 0, 0, 256, 256);
        
        gl.glDisable(GL10.GL_BLEND);
 
Back
Top Bottom