online poker

Sean Lynch

Death to Videodrome. Long live the new flesh.

Subscribe to Sean Lynch
Nov-9-2009

Lab 16

Posted by admin under Uncategorized

For this lab, we’re going to be talking a little bit about lighting, the difference between perspective and parallel projections, and how you can access individual frames in your MD2 model.

For information about textures, click here. A quick thing to note: BMP produces GL_RGB textures, but PCX is GL_RGBA. If you do not set this up correctly, your texture will not work properly. So, for BMP files, use GL_RGB for your texture format in glTexImage2D and for PCX, use GL_RGBA. If your textures don’t look quite right, it could be that they are BGR and not RGB. The RGB vs BGR is in the ordering of the colors when each pixel is read in; i.e. red, green, blue for a pixel vs blue, green, red. You can change this in BMP.h or PCX.h if you look at their load functions. There is also more info on texture mapping here.

For more information about lighting, click here.

For more information about projections, look here.

If you’re confused on smooth normals vs face normals, and you don’t make my tutorial, Steve has a nice mention on his site here. Also, if any of you have forgotten how to calculate the cross product, Steve has mention of how to do this on his site here, at the bottom of the page.

Tags:

Add A Comment