View Full Version : How can change the color from the bitmaps
In case of my project, I need to call some bitmaps for texture mapping. For the object I has use the texture, the margins of different faces contains a veriation of color. But it is the same color from the real world, so I has used the photoshop to check out the color. It seems that it is differ in the light intensity, so can anybody tell me how can I get the light intensity from the front view of bitmaps in openGL and recover it on the other bitmaps?
04-10-2003, 07:41 AM
OpenGL's default texture environment is GL_MODULATE (search for glTexEnv in the manual).
If you don't want the texture colors to be modulated by the lighting and colors of the underlying geometry, set the texture environment to GL_DECAL, which renders with the pure texture colors.
in my program, I need to texture an object with n polygons. I've try to texture it with 3 different bitmaps, which capture the front and side view of object. But when I texture it, the color of the object have a variation of different bitmaps. So, I think I need to recover the color different by convert the RGB color to YIQ color and apply the Y value on the side view of bitmaps. However, I don't know how to get the RGB color from the bitmaps in openGL, also how to assign a new color to the bitmaps.
04-10-2003, 10:55 AM
Relic gave you the answer. Read it again.
GL_MODULATE makes the color of the polygon blend in with the color of the texture. If you don't want that, use GL_DECAL. (or GL_REPLACE).
These are values that you pass in to the glTexEnv* functions.
Oh, I have done that, thanks a lot
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.