Drawing Color Same as Texture

Started by
2 comments, last by solacedagony 15 years, 9 months ago
Hi, My drawing color is same as texture-primitive (over which it is drawn) color. I have changed color after texture drawing but it doesn't change. Can anybody plz help regarding this?
Advertisement
Please post code of the relevant methods in SOURCE tags.
Well, some progress... In NeHe Lesson 06 (Texture Mapping), I've drawn Rectangle after Texture drawing, The rectangle is drawn of the same coloras texture. Even after changing the rectangle color color does not change. I've tried many combinations SO
I'm after a way to load texture image and draw any primitive BUT of different colors i.e. texture image's and say quad of different colors.

Thanks
It sounds to me like you're looking to use the Material colors stuff.

After a quick look around, it seems like you need to do...
glEnable( GL_COLOR_MATERIAL );glColorMaterial( GL_FRONT, GL_AMBIENT_AND_DIFFUSE );

...in order to use glColorxx to color textures.

You can also use:
float colorBlue[] = { 0.0f, 0.0f, 1.0f, 1.0f };glMaterialv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, colorBlue );


I got this info from: http://www.falloutsoftware.com/tutorials/gl/gl8.htm
Orranaim:SolacedAgonyICQ:14260031arsonicconvergen@hotmail.com

This topic is closed to new replies.

Advertisement