View Full Version : Texture Problem
I write a VC++ program to load a color BMP file to a rectangle but when i run it all the rectangles are in black and gray color. So what wrong?
nexusone
11-05-2002, 07:26 AM
Do you have lighting turned on?
If lighting is turned on is also Color matrial?
example:
glEnable(GL_LIGHTING);
glEnable(GL_COLOR_MATERIAL);
Originally posted by Gilbee:
I write a VC++ program to load a color BMP file to a rectangle but when i run it all the rectangles are in black and gray color. So what wrong?
B_old
11-05-2002, 07:27 AM
Hello.
glEnable(GL_TEXTURE_2D);
Maybe you forgot this?
You could always show us your code, though.
We might help you better then.
hi
sigh~~
I made a mistake when using gluBuild2DMipmaps
eg
gluBuild2DMipmaps(target, components, width, height,format,type, data )
I set the components to 1 so it only disply black color...
now my program can work~
Thx
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.