   HUD problems
  Greetings,Im attempting to draw a hud, and for a while i though i had it working from switching from orthographic back to projection...until i tried it with an alpha image..it seems it doesn't draw the alpha but all the 3d objects behind it arent being drawn, its like the alpha layer is a layer itself obstructing the scene. Im using DevIL but i must admit only having rudimentary knowledge of it here is the convert paramters i am using"ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE)"and just in case its my switch from orthographic to projection hereglMatrixMode( GL_PROJECTION );//glPushMatrix();glLoadIdentity();//glDisable( GL_LIGHTING ); gluOrtho2D( 0.0, 1024, 768, 0.0 ); glMatrixMode( GL_MODELVIEW );//glLoadIdentity();//glColor3f( 1,1,1 );glBegin(GL_QUADS);glTexCoord2i(0, 0); glVertex2i(0,   0);glTexCoord2i(0, 1); glVertex2i(0,   768);glTexCoord2i(1, 1); glVertex2i(1024, 768);glTexCoord2i(1, 0); glVertex2i(1024, 0);glEnd( );//Switch back to our projection modeglMatrixMode( GL_PROJECTION );glEnable( GL_LIGHTING );//Finish our calls aboveglPopMatrix( );//Switch back to our model matrix to continue with out 3D sceneglMatrixMode( GL_MODELVIEW );does anyone have any idea whats going on?cheers   
  HUD has to be drawn after everything else, and usually with disabled depth test.   ;  tried disabling depth test and was already drawing the hud Last....but to no avail...thanks for the input though   ;  anyone else got any suggestions? cant be a problem with devIL could it?   ;  Daft question: are you actually creating your HUD graphics with a transparency (alpha) channel? It looks like you're using ilConvertImage to add an alpha channel, but then that will just be filled with 100% maximum opacity.And have you setup the blend mode properly?   ;Quote:Daft question: are you actually creating your HUD graphics with a transparency (alpha) channel? It looks like you're using ilConvertImage to add an alpha channel, but then that will just be filled with 100% maximum opacity.And have you setup the blend mode properly?Daft response: erm...probably not...how would i set up blend properly?here is my image set up codeilGenImages(1, &ImageName); /* Generation of one image name */ilBindImage(ImageName); /* Binding of image name */ILboolean success = ilLoadImage( "flock.jpg" ); /* Loading of image "image.jpg" */if (success) /* If no error occured: */{success = ilConvertImage(IL_RGB, IL_UNSIGNED_BYTE); /* Convert every colour component into unsigned byte. If your image contains alpha channel you can replace IL_RGB with IL_RGBA */if (!success){/* Error occured */exit( 1 );}    }    glGenTextures( 1, &image ); /* Texture name generation */    glBindTexture(GL_TEXTURE_2D, image); /* Binding of texture name */    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); /* We will use linear interpolation for magnification filter */    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); /* We will use linear interpolation for minifying filter */    glTexImage2D(GL_TEXTURE_2D, 0, ilGetInteger(IL_IMAGE_BPP), ilGetInteger(IL_IMAGE_WIDTH),ilGetInteger(IL_IMAGE_HEIGHT), 0, ilGetInteger(IL_IMAGE_FORMAT), GL_UNSIGNED_BYTE, ilGetData()); /* Texture specification */ilDeleteImages( 1, &ImageName );;  Okay, first of all, drop the converting to RGBA. You only need to start messing around like that if you're going to be controlling transparency on a per-pixel basis (and if you are, you set those values in an image editor and save to a format that has it's own alpha channel, such as PNG or TGA).Load your texture as a normal image. When it comes to drawing HUD elements, specify the transparency using glColor4f (1.0f, 1.0f, 1.0f, alpha), where alpha is of course between 0 (invisible) and 1 (solid).Preceed the start of the HUD drawing with:glEnable (GL_BLEND);glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);DRAW HUD HEREglDisable (GL_BLEND);Regarding the glColor4f, you can use this to control transparency on a per-element basis. If you have some elements that should be see-through and some that shouldn't, then just make another call to glColor4f before drawing it.The usual rules about disabling depth testing and depth writes still apply :)   