Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you are sure you set up open gl right, then more often then not the problem is where you are drawing. You could be drawing out of the range of the view. Be very careful with your translates and such.</p> <p>You also may need to flip your poly, I know I have had that issue before where you are looking right through it because your drawing is facing its back to you.</p> <p>when I did this my draw looked very similar to this</p> <pre><code>* This is where you draw the screen, called every auto onDraw Loop pass * ************************************************************************/ //Log.d("Game", "Render"); gl.glViewport(0, 0, Screen.SCREEN_WIDTH, Screen.SCREEN_HEIGHT); gl.glClear(GL10.GL_COLOR_BUFFER_BIT); gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadIdentity(); gl.glOrthof(0, Screen.WIDTH_SCALE, 0, Screen.HEIGHT_SCALE, 1, -1); //gl.gltranslatef(x,y,z) will translate everything drawn here after by that amount, effectively scrolling the view. gl.glEnable(GL10.GL_BLEND); gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); gl.glEnable(GL10.GL_TEXTURE_2D); MeshRect mRect; // this holds all of our rectangles gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); /***************** so this is how it goes for rendering any object **************************************************** ball.Update(deltaTime); //first update the object gl.glPushMatrix(); gl.glLoadIdentity(); gl.glTranslate(x,y,z); texture.bind(gl, Texture.TEXTURE_BALL2); //then bind the texture we would like to use mRect = new MeshRect(ball.getMyRect()); //then create the rectangle at (0,0,0) mRect.Draw(GL10.GL_TRIANGLES, gl); //Finally tell that rectangle to draw gl.glPopMatrix(); *********************************************************************************************************************** </code></pre> <p>of course this is ortho, and yours looks to be 3d, but the basics should be near the same.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload