Hi, i’m quite new to OpenGL. I was wondering if it’s possible to display a message using an gl… or glut… function.
if it is possible could some one advice me how to do it!
Thanx a lot.
PS: I have this idea of drwaing a “heart” in 3D. could someone point me in the right direction of how to draw it?
Thanx again.
What you can use is: (this is in java, you will need to change bits for ‘C’ i.e. remove the preceeding gl. on all the gl commands and maybe some other bits):
//methods for displaying strings on the screen (in 2 different font sizes)
public void RenderStringSmall(String renderStr, double x, double y){
gl.glColor3f(1,1,1);
gl.glRasterPos2d(x, y);
glut.glutBitmapString(glut.GLUT_BITMAP_TIMES_ROMAN_10, renderStr);
}
public void RenderStringLarge(String renderStr, double x, double y){
gl.glColor3f(1,1,1);
gl.glRasterPos2d(x, y);
glut.glutBitmapString(glut.GLUT_BITMAP_TIMES_ROMAN_24, renderStr);
}
And then call it i.e.:
RenderStringLarge ("Press n to start a new game", 175, 240);
(Robbed from my space invaders game I did some time last year)