question on glRasterPos function & GL_QUADS


I am trying to render a solid filled quad onto my window. I am wanting it in screen coordinates so I am using glRasterPos2d. But for some reason, the quad is not rendering. Can you render such things to screen coordinates using glRasterPos? The reason why I am doing this is because I am rendering some pixmap fonts to the screen using the FTGL library and want to put a solid “background” for the text. Since the fonts are pixmaps, I have to render them using glRasterPos. Using the method below I can render the fonts to the screen fine, but for some reason it is not working. Below is the code I am using to output the quad to the screen.

widthL = (float)pwinM->widthM.GetValue();
heightL = (float)pwinM->heightM.GetValue();

glViewport( 0, 0, (int)widthL, (int)heightL );
islightingL = MLF_GetState(GL_LIGHTING);
isdepthL = MLF_GetState(GL_DEPTH_TEST);

gluOrtho2D( 0.0f, widthL, 0.0f, heightL );

/* this is just getting the color to use for the background */
pNodeA->polyM->bgd_blueM.GetValue() );

/* setting the raster pos, yes I know that I don’t have to use 3d and that I can use 2d, but it doesn’t make a difference either way since the Z value is 0.0f */
glRasterPos3d(pNodeA->polyM->xposM.GetValue() * widthL, (pNodeA->polyM->yposM.GetValue() * heightL) , 0.0f );

/* minhL = minimum height, maxhL = maximum height, maxwL = maximum width, all are computed earlier in the function. I can provide code for that but it basically gets the length of the string using the ftgl font library functions */



I appreciate any help/advice anyone can give me on this. I believe that this should be an easier problem to solve but for some reason it is eluding me.

Thanks again

I don’t think that glRasterPos works for the quad, because screen coordinates and world coordinates/ model coordinates are two different things. (although I have heard about an extension that is supposed to that)

Thank you powerpad, that is what I was afraid of and needed someone to confirm. Any suggestions on how I could get a quad to render in the same place on the screen as my text then?