Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Bitmap Font

This topic is 5187 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi guys... I am using tutorial 13 which the bitmap font.. its simple enough to use but I am trying to use the tutorial in my code but it doesn''t seem to show.. I am using multiple viewports and using the code to show fonts on one of the viewports in ortho2d.. i also changed the raster position to 2 elements (x,y).. but its still not showing...please help

Share this post


Link to post
Share on other sites
Advertisement
Can you show some of your inilization code and the actual rendering? If you want to do a quick test, comment everything out in your inilization and add these lines of code; adjust if your function requirements are different.

if(!LoadBMP())
{
return FALSE;
}
glShadeModel(GL_SMOOTH);
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
BuildFont();
glEnable(GL_TEXTURE_2D);
gluLookAt(0.0, 0.0, 0.0, 0.0, 0.0, -150.0, 0.0, 1.0, 0.0);


It could be either that it is rendering off your screen or it is behind something.

Share this post


Link to post
Share on other sites
BOOL Initialize (GL_Window* window, Keys* keys) // Any GL Init Code & User Initialiazation Goes Here
{
g_window= window;
g_keys = keys;
if (!LoadGLTextures())
{
return FALSE;
}
glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); glEnable(GL_TEXTURE_2D);
glShadeModel(GL_SMOOTH);
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glBlendFunc(GL_SRC_ALPHA,GL_ONE);
glEnable(GL_BLEND);

return TRUE;
}

tried disabling depth testing and blending.. but it still wont show

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!