View Full Version : texture mapping
Hi, I would like to ask if I have called glColor3f() to set a color to draw sth, after that, what should be called so that other object, which is to be texture mapped, will not be affected by that color? (as currently, after using red in glColor3f, my background is red..)
01-11-2004, 10:04 AM
that is why i told (rather advised) you to read ogl specs. when you set gl color and then feed vertices to opengl, the vertex colors will be the set value. for texture mapped objects, you do not have to disable colors. i dont know how vertex color affects texture mapping (as i dont make any texture mapping yet), but everything is written in the specs (ive read it once, but dont remember)
i dont know the slution for this colored background problem. glcolor should not affect the buffer clear color.
btw if you dont want to look up every function in the specs or ask it here, go to www.msdn.com, (http://www.msdn.com,) the have a very nice opengl reference for function (just search for it)
hi all, here is my case:
Of course the vertex-color DOES affect the texture. The texture gets multiplied with the vertex-color, so if your vertex-color is red, then your texture will look red too.
If you donīt want your texture to get colored in any way, then simply set your vertex-color to white, because when you multiply something with white, then it does not get changed.
If you are a real beginner in OpenGL, then you should get a book about OpenGL. Itīs very hard to figure all that stuff out only by reading some tutorials and trying it out by yourself.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.