   I can get 2d to work, but not 3d : (
  Alright, here's my problem.  I can do 2d stuff just fine.  But...Whenever I try to do anything involving depth, either nothing happens or nothing appears.Example: I draw a triangle and change the depth to -0.5f.  It doesn't do anything, it looks the same as if the depth is 0.0f.  I change the depth to -1.0f, it doesn't do anything.  As a matter of fact, all of my shapes look the same regardless of my giving them a depth anywhere from 1.0f to -1.0f.But then if I change the depth to -1.1f or 1.1f, nothing shows up at all.  I'm even copy pasting code directly out of NeHe's tutorials and it's still doing this.  Is this a common problem?  I'll post code if needed but hopefully someone will have an idea on it without that...   
  Sounds to me like you entered orthogonal projection mode and then forgot about it. You need to set up the projection matrix correctly, among other things. Try gluPerspective()   ;Quote:Original post by lightbringerSounds to me like you entered orthogonal projection mode and then forgot about it.Yea most likely cause no matter how far out/in it is it will be the same size.  You want perspective projection.;  It's just a small test program, so looking at it I can say with one hundred percent certainty there isn't a glOrtho anywhere :( just a glFrustum when things start up   ;Quote:Original post by BrknPhoenixIt's just a small test program, so looking at it I can say with one hundred percent certainty there isn't a glOrtho anywhere :( just a glFrustum when things start upThen your projection matrix is set up for 2d using glFrustum, but you need a different one for 3d. You could just use gluPerspective instead, it's more intuitive and works for most things you'd want to do. Then use glOrtho to set up the prjection matrix when you want to do 2d in a mixed environment.   ;  is glFrustum set up for 2d by default?   ;  No, glFrustum is a convenience function that computes and sets a matrix, it's not really set up for anything (I'm not sure how to get an orthogonal projection with it, but supposedly it's possible). But I think OpenGL is set for orthogonal perspective by default. From your description it's pretty much a given that you've managed to set up some kind of orthogonal projection (objects not scaling with distance), but it's hard to guess at where exactly your error is without seeing the actual code.You really want to use glOrtho() and gluPerspective() for orthogonal or perspective projections, respectively.   ;  Well, I used gluPerspective and it works now, thanks :) Although I'm still really curious about what's going on with glFrustum...   ;  A frustrum is like a pyramid with the top cut off (picture). OpenGL uses it to scale thing off in the distance. When it renders, OpenGL basically fills the frustrum into a cube. This makes nearer the camera look bigger because they take up a larger portion of the plane at that point in the frustrum. (I think it might be more complicated than that, but that's a good way to understand it).The call to glFrustrum sets the size of that frustrum. If you make it square-like, things will not scale off in the distance much. I'm curious how you managed this though, could you post the call?   ;Quote:Original post by BrknPhoenixBut then if I change the depth to -1.1f or 1.1f, nothing shows up at all.  I'm even copy pasting code directly out of NeHe's tutorials and it's still doing this.  Is this a common problem?  I'll post code if needed but hopefully someone will have an idea on it without that...That's because your objects are out of the frustrum. The frustrum no only define the object's deformation to simulate perspective, it also define the 3D area that will be rendered. Any object outside of the frustrum is dropped.   