color plates

Does anyone know where I can get the code for the color plates inside of the OpenGL red book?

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.

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.

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:

glBindTexture(GL_TEXTURE_2D, my_texture);

// 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).]

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.