heads up display for OCC

Hi did anyone try implementing heads up display for OCC based application? if so could anyone give suggestions how to implement it?

Thanks,
V

Venugopal Gudimetla's picture

BTW, I did try a funtion

void View::DrawHud()
{
// Temporary disable lighting
glDisable( GL_LIGHTING );

// Our HUD consists of a simple rectangle
glMatrixMode( GL_PROJECTION );
glPushMatrix();
glLoadIdentity();
glOrtho( -100.0f, 100.0f, -100.0f, 100.0f, -100.0f, 100.0f );

glMatrixMode( GL_MODELVIEW );
glPushMatrix();
glLoadIdentity();
glColor3f( 1.0f, 1.0f, 1.0f );
glBegin( GL_QUADS );
glVertex2f( -90.0f, 90.0f );
glVertex2f( -90.0f, 40.0f );
glVertex2f( -40.0f, 40.0f );
glVertex2f( -40.0f, 90.0f );
glEnd();
glPopMatrix();
glPushMatrix();
glLoadIdentity();
glTranslatef( -60.0f, -90.0f, 0.0f );
glScalef( 0.1f, 0.1f, 0.1f );

glPopMatrix();

glMatrixMode( GL_PROJECTION );
glPopMatrix();

// Reenable lighting
glEnable( GL_LIGHTING );
}

but unfortunately I can't see anything on my Viewer so if anyone can point to what I am doing wrong or have implemented it please help me.

Thanks,
V