Skip to main content
gamedev.net
🔒 Locked

Font problems...

Started by Kaezin 3 replies 300+ views
Original Post
Kaezin
Kaezin
Alright I''m using NeHe''s first font tutorial and I came across something that''s screwing me up... If I draw the font alone, I see it just fine and dandy. But when I try to start drawing other objects, the font is black! Can anyone help me?
  
int DrawGLScene(GLvoid)									// Here''s Where We Do All The Drawing

{
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);	// Clear The Screen And The Depth Buffer


	glBindTexture(GL_TEXTURE_2D, texture[DOME_SIDE]);

	glLoadIdentity();							// Reset The View

	
	glRotatef(pCamera->xrot,1.0f,0.0f,0.0f);
	glRotatef(360-pCamera->yrot,0.0f,1.0f,0.0f);

	//This moves the world to simulate camera movement

	glTranslatef(-pCamera->xpos,-pCamera->ypos,-pCamera->zpos);
	
	//Draw Blue Guy

	glColor3f(0.0f,0.0f,1.0f);
	DrawDomes(pDome1->xpos,pDome1->ypos,pDome1->zpos,pDome1->xrot,pDome2->yrot);
	//Draw Red Guy

	glColor3f(1.0f,0.0f,0.0f);
	DrawDomes(pDome2->xpos,pDome2->ypos,pDome2->zpos,pDome2->xrot,pDome2->yrot);
	
	//DrawProjectiles();


	glColor3f(1.0f,0.0f,0.0f);
	glRasterPos2f(-1.0f, 0.0f);

	glPrint("Active OpenGL Text With NeHe");	// Print GL Text To The Screen


	return TRUE;										// Keep Going

}  
Half the people you know are below average.Trogdor the Burninator
Crispy
Crispy
What does glPrint(...) look like?
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
davepermen
davepermen
glDisable(GL_TEXTURE_2D);

opengl is a STATE MACHINE..

it will texture until you tell it to stop..

"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
lp23
lp23
I'm guessing you mean lesson 17 - it seems that glcolor is not called in glPrint(). When you draw your objects you have glcolor(1.0f, 0.0f, 0.0f) so if the font may not show up (which it doesn't). Try putting glcolor(1.0f, 1.0f, 1.0f) right before the glPrint call.

Luigi Pino
The 23rd Dimension

[edited by - lp23 on August 2, 2002 9:41:58 PM]
Kaezin
Kaezin
glDisable(GL_TEXTURE_2D) worked great, thanks!
Half the people you know are below average.Trogdor the Burninator

Topic Locked

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

Sign in to reply to this topic.