   Problem with the resizing window when Bitmap fonts are being used
  Hi there,I wanted to draw a welcome screen for my application..and hence used bitmapfonts to draw the msz...but the problem is when I resize the window....text appears at the same place where it was before the resizing,thereby disturbing the ordering of text....I am using text in my application displaying it with 3D app. but there also same prob. occurs....my reshape function is not working for texts  what hould be done??here is the code:[SOURCE]void set2Dprojection(){glMatrixMode(GL_PROJECTION);glPushMatrix();glLoadIdentity();glViewport(0, 0, w, h);gluOrtho2D(0, w, 0, h);glScalef(1, -1, 1);glTranslatef(0, -h, 0);glMatrixMode(GL_MODELVIEW);}void displaytext(float x, float y, void *font,char *string){    char *c;  set2Dprojection();glLoadIdentity();  glRasterPos2f(x, y);  for (c=string; *c != '\0'; c++)glutBitmapCharacter(font, *c);  backto3D();glPopMatrix();  }// THIS IS MY RESHAPE FUNCTION WRITTEN FOR THE 3D APP., IT FAILS TO REPOSITION //THE TEXT APPEARING ON THE SCREEN WHEN WINDOW IS RESIZEDvoid myreshape(int w1, int h1){if(h1 == 0)h1 = 1;w=w1;h=h1;curwidth=w;curheight=h;reshapefor2D();GLfloat ratio = 1.0f * w / h;glMatrixMode(GL_PROJECTION);glLoadIdentity();glViewport(0, 0, w, h);gluPerspective(45,ratio,1,1000);glMatrixMode(GL_MODELVIEW);glLoadIdentity();gluLookAt(x, y, z,  x + lx,y + ly,z + lz,  0.0f,1.0f,0.0f);}[/SOURCE]
  Based on your 2d projection matrix you are specifying the x,y pixel coordinates where you want your text to be drawn. If you draw a text at 100,100 in a window that is 200 by 200, your text will be drawn in the middle of the screen, but if you have a 1280x1024 window, the text will still only be 100 pixels from the bottom (or top?) and side.If you want your text to be positioned relative to the window, then you can't rely on specifying pixel-based coordinates. If you always want the text relatively in the same place regardless of window size, then specify your glOrtho to be from 0->1, 0->1 instead of 0->w and 0->h. Then you can use a relative position from 0 to 1 for your rasterpos.In this case if you set rasterpos to 0.5 it will always be directly in the center of the screen, regardless of window size.   ;  Thanx a lot for the info.....It works...BTW Can't I use 2,2 in place of 1,1 or any other number??   ;  Yes you don't have to use 1,1, it was just an example. Anything should be fine as long as it is constant across window resizing (otherwise you will have to update your x/y to compensate based on window size).   ;  K....gOT it..Thanx a lot....:)   