glDrawTexiOES texture flipped


Last Updated:

  1. blither

    blither Member This Topic's Starter

    Joined:
    May 24, 2010
    Messages:
    12
    Likes Received:
    0
    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 (Text):
    1.  
    2. GLU.gluLookAt(gl, 0.0f, 0.0f, 5f,
    3.                 0.0f, 0.0f, 0.0f,
    4.                 0.0f, 1.0f, 0.0f);
    5.  
    My main issue is when I tried rendering a texture with verteces it rendered fine.

    Any ideas?
     

    Advertisement
  2. blither

    blither Member This Topic's Starter

    Joined:
    May 24, 2010
    Messages:
    12
    Likes Received:
    0
    Here is what I am using to render

    Code (Text):
    1.  
    2.         gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
    3.  
    4.         gl.glEnable(GL10.GL_BLEND);
    5.         gl.glColor4x(0x10000, 0x00000, 0x10000, 0x10000)
    6.        
    7.         int[] cropRect={0,0,256,256};
    8.         gl.glFrontFace(GL10.GL_CW);
    9.         ((GL11)gl).glTexParameteriv(GL10.GL_TEXTURE_2D,
    10.                 GL11Ext.GL_TEXTURE_CROP_RECT_OES, cropRect, 0);
    11.         ((GL11Ext) gl).glDrawTexiOES(0, 0, 0, 256, 256);
    12.        
    13.         gl.glDisable(GL10.GL_BLEND);
    14.  
     

Share This Page

Loading...