View Full Version : color plates
04-20-2001, 01:27 PM
Does anyone know where I can get the code for the color plates inside of the OpenGL red book?
04-20-2001, 01:51 PM
Well, I only know where you can get the code for all of the example programs in the red book. I believe some of the plates are from those examples but maybe only a few. Sorry, that probably isn't much help, but if it is I'll give you the site address.
04-21-2001, 11:12 AM
Well thanks for the thought, but I have the red book and it told me where to get those. What I really need is an example that renders both texture mapped polygons and colored polygons in the same scene. Then the scene is lit and shaded. If you have an example of that, that would be great.
04-21-2001, 03:02 PM
I don't have an example, but this may help.
Start with an example in the book that deals with texture mapping polygons. Then just turn off GL_TEXTURE_2D for polys that you don't want texture mapped. In general that looks like:
// draw some polys here, specifying texture coordinates, and possibly vertex normals if you want GL lighting
// draw some more polys here, but these will be untextured
[This message has been edited by ericchan (edited 04-21-2001).]
04-21-2001, 04:36 PM
I have done that but my colored polygons have turned out white when I do it. I didn't know if I can set glEnable(GL_COLOR_MATERIAL) and then disable it when I am finished drawing that polygon that is colored or what. The problem is when I do that the colors of the textures get screwed up. Thanks for your response though.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.