Alluminitti
March 4th, 2005, 05:23 AM
What I know so far...
Hello,
Let me try to get this straight. When you setup a video mode to have 32 Bits-Per-Pixel you basically have a color buffer of the size of 2^32, meaning that you application can display 2^32 different colors if the GPU allows it. When you set a depth buffer to be 16 bits this means that your depth buffer is of size 2^16 and has 2^16 "levels" of z values(I'm still a little fuzzy on this one).
Stencil buffer concerns.
What about the Stencil buffer? My book says that you could use the Stencil buffer to block out portions of the screen from rendering. With this in mind how in the world can you make shadows by blocking out portions of the screen? That certainly doesn't make any sense unless the Stencil buffer has more uses than this.
Depth buffer question.
Back to the depth buffer. When a vertex passes the depth test this means that it's z-value is closer to the camera than the other vertex that the API compared it to? Of course this would depend on what kind of depth test you're performing. In OpenGL I always use GL_LEQUAL.
Matrix transformation order in OpenGL.
In OpenGL, the world/model and camera/view matrices are combined into one, modelview matrix. If memory serves me correct, the multiplication order of matrices are somewhat significant and typically in 3D applications you'd load the modelview matrix and then multiply that with the projection matrix. How comes in OpenGL(using it with SDL) its the complete opposite? I setup the projection matrix first, right after the window is created and then when I begin my scene I multiply an identity matrix with my camera. It stills work with OpenGL so I guess there is no significances with the order in which you concatonate/multiply matrices in OpenGL?
Hello,
Let me try to get this straight. When you setup a video mode to have 32 Bits-Per-Pixel you basically have a color buffer of the size of 2^32, meaning that you application can display 2^32 different colors if the GPU allows it. When you set a depth buffer to be 16 bits this means that your depth buffer is of size 2^16 and has 2^16 "levels" of z values(I'm still a little fuzzy on this one).
Stencil buffer concerns.
What about the Stencil buffer? My book says that you could use the Stencil buffer to block out portions of the screen from rendering. With this in mind how in the world can you make shadows by blocking out portions of the screen? That certainly doesn't make any sense unless the Stencil buffer has more uses than this.
Depth buffer question.
Back to the depth buffer. When a vertex passes the depth test this means that it's z-value is closer to the camera than the other vertex that the API compared it to? Of course this would depend on what kind of depth test you're performing. In OpenGL I always use GL_LEQUAL.
Matrix transformation order in OpenGL.
In OpenGL, the world/model and camera/view matrices are combined into one, modelview matrix. If memory serves me correct, the multiplication order of matrices are somewhat significant and typically in 3D applications you'd load the modelview matrix and then multiply that with the projection matrix. How comes in OpenGL(using it with SDL) its the complete opposite? I setup the projection matrix first, right after the window is created and then when I begin my scene I multiply an identity matrix with my camera. It stills work with OpenGL so I guess there is no significances with the order in which you concatonate/multiply matrices in OpenGL?