Starting OpenGL ES
Have you enabled depth testing, and have a depth buffer?
glEnable(GL_DEPTH_TEST);
GLint depth_bits;
glGetIntegerv(GL_DEPTH_BITS, &depth_bits);
depth_bits should be >0.
If your code is derived from Apple's sample EAGLView, search for "USE_DEPTH_BUFFER" and set it to 1 to create a depth buffer.
glEnable(GL_DEPTH_TEST);
GLint depth_bits;
glGetIntegerv(GL_DEPTH_BITS, &depth_bits);
depth_bits should be >0.
If your code is derived from Apple's sample EAGLView, search for "USE_DEPTH_BUFFER" and set it to 1 to create a depth buffer.
Did you request a depth buffer and enable depth testing? Did you turn on back-face culling?
Thanks for your help.
I managed to fix my problem, forgot to enable depth testing; however, it seems as if the back face of the triangle is missing. You can see this in the screenshots I posted, I thought they were caused by the same issue, but I guess not. It's as if it isn't being drawn.
EDIT: Stupid me, I fixed my problem. Was specifying the vertex count as 9, not 12.
I managed to fix my problem, forgot to enable depth testing; however, it seems as if the back face of the triangle is missing. You can see this in the screenshots I posted, I thought they were caused by the same issue, but I guess not. It's as if it isn't being drawn.
EDIT: Stupid me, I fixed my problem. Was specifying the vertex count as 9, not 12.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Starting with OpenGL, need some help | wsc981 | 5 | 4,523 |
Jul 17, 2010 06:28 AM Last Post: wsc981 |
|
| Starting with OpenGL ES | techy | 2 | 2,448 |
Dec 21, 2009 12:10 PM Last Post: techy |
|
| starting to work with openGL, need some help | smartalco | 1 | 2,348 |
Mar 26, 2007 08:21 PM Last Post: arekkusu |
|
| openGL questions before starting 3d engine code | chopplebrains | 16 | 6,982 |
Jan 15, 2003 01:42 PM Last Post: henryj |
|

