loading bmp with glut

while not the correct way to do it
use
glColor3f(0.0f,0.0f,0.0f);

just before you draw your quad with the picture.

Originally posted by The_Spider:
[b]while not the correct way to do it
use
glColor3f(0.0f,0.0f,0.0f);

just before you draw your quad with the picture.[/b]

Hi Spider,
i tried it . it didn’t work.
i dont know what other people are doing??
why r rtey not replying???

Hello prashantgp,

I will look into the Bitmap problem and I will see if I can derive an answer. One thing that could help is if you send me your code, if you don’t mind, and I will see if I can figure out what the problem is.

  • VC6-OGL

prashantgp,
I am not precisely sure what you are asking. I assume you have a texture mapped to a quad or other set of polygons and overtop you are drawing lines which change position with each rendering pass. But, do you want the lines to blend with the background? Is that what you are asking? If so,

Try:

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

draw your lines

glDisable(GL_BLEND);

You might want to mess around with the parameters for glBlendFunc and see what you like best.

If that is not what you are asking, please rephrase.

Actually, having reread your post I think I was wrong in what you wanted. Use glGetError() after your glTexImage call and see if it gives an error.

[This message has been edited by shinpaughp (edited 03-08-2003).]

Looking at your code even closer, it doesn’t appear as though you have a glTexImage(1D, 2D, or 3D) call anywhere. You should probably call it from your init function similarly to how happy did it in the code above. Unless of course the function is called from the implementation file associated with bitmap.h

I could be wrong, but doesn’t your video card have to support 24 bit color to display 24bit color BMP’s?

I know the last couple of video cards I bought only supported 16 and 32 bit color.

I once had a similar problem and the solution was to convert the image to 16 bit color.

I could be WAAAAAAAY off though.