void GLUI_StaticText::set_text( const char *text ) { int orig; /**** Erase old text first *****/ glMatrixMode( GL_MODELVIEW ); glPushMatrix(); translate_to_origin(); erase_text(); glPopMatrix(); set_name( (char *) text ); if ( NOT can_draw() ) return; orig = set_to_glut_window(); /**** Redraw the text in the window ****/ glMatrixMode( GL_MODELVIEW ); glPushMatrix(); translate_to_origin(); draw_text(); glPopMatrix(); restore_window( orig ); }
void GLUI_StaticText::set_text( char *text ) { int orig, state; orig = set_to_glut_window(); state = glui->set_front_draw_buffer(); /**** Erase old text first *****/ glMatrixMode( GL_MODELVIEW ); glPushMatrix(); translate_to_origin(); erase_text(); glPopMatrix(); set_name( text ); if ( NOT can_draw() ) return; /**** Redraw the text in the window ****/ glMatrixMode( GL_MODELVIEW ); glPushMatrix(); translate_to_origin(); draw_text(); glPopMatrix(); glui->restore_draw_buffer(state); restore_window( orig ); }
void GLUI_ActiveText::draw_translated_active_area( ) { GLUI_DRAWINGSENTINAL_IDIOM; glPushMatrix(); translate_to_origin(); draw_active_area(); glPopMatrix(); }
void GLUI_Control::translate_and_draw_front() { GLUI_DRAWINGSENTINAL_IDIOM glMatrixMode( GL_MODELVIEW ); glPushMatrix(); translate_to_origin(); draw(0,0); glPopMatrix(); }