3 questions....

What is your name? … What is your quest?.. errr … What is your favorite color? … :stuck_out_tongue:

I mean the real questions are ( Answer right or you will be thrown down the bridge! ) :
1- Imagine that I create a texture object ,define its filters , and define its image with glTexImage2D(…). Now imagine that I want do get rid of this object and I use
Now tell me this… Will the image that I passed with a pointer in glTexImage2D(…) in the last parameter ,be also deleted or I have to delete it?

2- Now imagine that I have a bunch of bmp images representing the animation of character , the image consists of the character in a black background , now I want to know how I render these images without the black background (in DirectX you can specify the color that you dont want to draw,does OpenGL have a function like that?)

3-When I tried to render some time ago textured objects with transparent objects I had some serious color problems because the textures were always being rendered with the color of the last transparent triangle (their colors were being mixed) I solved this problem placing the last comand in the draw function as glColor4f(1,1,1,1);
It worked ok ,But now I wonder , and If I wanted to render transparent textures with opaque ones … what do I have to do?

I dont know that ! !!! Arrrgghhh!!!

  1. When you create a texture object, OpenGL creates its own copy image (the texture itself). Right after creating the texture you can delete the image you passed.

  2. In OpenGL, you will need to use alpha testing rather than color masking. What you can do is convert the 24 bit RGB data to 32 bit RGBA and set A to 0 for pixels that match the colormask, set A to 255 otherwise. Then a simple alpha test can reject all pixels with zero alpha.

  3. In general, you must draw all opaque polygons first, and then draw all transparent polygons in depth sorted order, far to near. (There are exceptions to this rule). If the texture environment mode is GL_MODULATE, all textures are modulated by the current primary color. This behavior is independent of the transparency of any previous polygon.

what is the maximum air-speed of an un-laden sparrow?!

African or European?

What is the capital of Assyria?

I don’t know that!