Skip to main content
GameDev.net gamedev.net
🔒 Locked

Screen space fonts

Started by wasssup1990 Feb 27, 2009 at 6:52 AM 1 replies 850+ views
Original Post
wasssup1990
wasssup1990
Hello, I need to display cirtain simulation readings in my OpenGL window using screen space. How can this be done? Thanks
WOsborn
WOsborn
I use FTGL for openGL text rendering.


This should get you headed in right direction:
//Init()#include <FTGLBitmapFont.h>const char* font_name = "Arial.ttf";FTFont* FTGL_font = new FTGLBitmapFont( font_name );//----------------------------------------------// Render()// set colorglColor4f(1,0,0,1);// set screen locationglRasterPos2d(screen_x, screen_y);// clear some openGL stateglUseProgramObjectARB( 0 );glActiveTextureARB( GL_TEXTURE0_ARB );const char* frames_per_second = "Frames per second: 60";FTGL_font->Render( frames_per_second );
wasssup1990
wasssup1990
That should do the trick. I'll see how I go.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.