and this is my main cockpit panel!
Now I am trying to get rid of the white colour from the panel image!
I know that I should use Alpha blending which I used but it works in the other way round now!! ie. white colour still stays solid but the areas which display the panel are transparent!!
How do I do that it will ignore completely the white background colour (ie. white not visible at all) and the panel will be completely solid (visible) ie. not transprent at all clearly visible!
this is what I wrote:
glEnable(GL_BLEND); // Enable Blending
glBlendFunc(GL_SRC_ALPHA, GL_ONE); // Select The Type Of Blending
glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
glPushMatrix(); // Store The Projection Matrix
glLoadIdentity(); // Reset The Projection Matrix
gluOrtho2D(0, winWidth,0,winHeight); // Set Up An Ortho Screen
glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
glPushMatrix(); // Store The Modelview Matrix
glLoadIdentity(); // Reset The Modelview Matrix
glEnable(GL_TEXTURE_2D);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, 0.9f);
//display map HUD
glBindTexture(GL_TEXTURE_2D, cockpitPanel);
//draw the panel at the bottom of the window
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f); glVertex2d( 0.0, 0.0); // Bottom Left Of The Texture and Quad
glTexCoord2f(1.0f, 0.0f); glVertex2d( winWidth, 0.0); // Bottom Right Of The Texture and Quad
glTexCoord2f(1.0f, 1.0f); glVertex2d( winWidth, winHeight); // Top Right Of The Texture and Quad
glTexCoord2f(0.0f, 1.0f); glVertex2d( 0.0, winHeight); // Top Left Of The Texture and Quad
glEnd();
glDisable(GL_TEXTURE_2D);
glDisable(GL_ALPHA_TEST);
glDisable(GL_BLEND);
...........etc..
thanks for your time!!