I have returned to this group, once again. In search of assistance. Dealing 
with OpenGL ES 1.0, I'm having trouble getting back face culling to work. I 
have been following a variety of random tutorials that I've found for 
OpenGL, but this 
one<http://www.droidnova.com/android-3d-game-tutorial-part-v,376.html>in 
particular. The sample code works fine, but I'm not sure what I'm doing 
wrong. All I know is that it is about how I wind the vertices into the 
index buffer.

For instance, I try to create a cube. I get this.

<http://imgur.com/07nbH.png>


The vertices / indices for that would be:

[code]float[] coords = { 
-0.5f, 0.5f, -0.5f,
-0.5f, -0.5f, -0.5f,
0.5f, -0.5f, -0.5f,
0.5f, 0.5f, -0.5f,
-0.5f, 0.5f, 0.5f,
-0.5f, -0.5f, 0.5f,
0.5f, -0.5f, 0.5f,
0.5f, 0.5f, 0.5f,

};

short[] indices = new short[] { 
 //Front 
0,1,2,
2,3,0,
 //Right
3,2,6,
7,6,3,
 //Back
7,6,5,
7,4,5,
 //Left
0,1,5,
0,4,5,
 //Bottom
1,5,2,
2,6,5,
 //Top
0,3,4,
3,7,0,

};[/code]


No idea what I'm doing wrong, help greatly appreciated!

-- 
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