I'm wanting to get a debug console up and running so I don't have to keep checking logs after a debug session but can get some good ol' feedback in realtime.
Plus I'll be able to make more use of my dynamic variable system.
Anyways t'was all going fine-ish until I realised I couldn't get the console text to draw on top of the console quad.
Here's my call to glOrtho:
Code:
glOrtho( 0.0f, width, height, 0.0f, 0.0f, 100.0f );
Here's the drawing code for the console:
Code:
void Console::OnUpdate( const int deltaMilliseconds )
{
Process::OnUpdate( deltaMilliseconds );
if ( mActive )
{
glColor4f( 0.8f, 0.8f, 0.8f, 0.5f );
if ( mDropping )
{
while ( !mFullyVisible )
{
glBegin( GL_QUADS );
glVertex2i( mXPos, mYPos );
glVertex2i( mXPos + mWidth, mYPos );
glVertex2i( mXPos + mWidth, mYPos + 200 );
glVertex2i( mXPos, mYPos + 200 );
glEnd();
if ( (mYPos += deltaMilliseconds) >= -10 )
mFullyVisible = true;
}
mDropping = false;
}
if ( mFullyVisible )
{
mFont->Render( mXPos + 10, mYPos + 190, mFontBase, "PI is exactly 3" );
glBegin( GL_QUADS );
glVertex2i( mXPos, mYPos );
glVertex2i( mXPos + mWidth, mYPos );
glVertex2i( mXPos + mWidth, mYPos + 200 );
glVertex2i( mXPos, mYPos + 200 );
glEnd();
}
}
}
Focusing on mFont->Render() there. See I initially had after the glBegin() / glEnd() block and moved it in front thinking it would help.
I swear I'm misunderstanding something
I tried using glVertex3f() and fiddling the Z coord but at one point it stopped drawing it all-together (except the text).
EDIT: Oh yeah I took a picture but forgot to attach it...
EDIT2: I can't be bothered to resize it and such so just bloody visualise it