void fgBuildRenderStates( void ) {
default_state = new ssgSimpleState;
+ default_state->ref();
default_state->disable( GL_TEXTURE_2D );
default_state->enable( GL_CULL_FACE );
default_state->enable( GL_COLOR_MATERIAL );
default_state->disable( GL_LIGHTING );
hud_and_panel = new ssgSimpleState;
+ hud_and_panel->ref();
hud_and_panel->disable( GL_CULL_FACE );
hud_and_panel->disable( GL_TEXTURE_2D );
hud_and_panel->disable( GL_LIGHTING );
hud_and_panel->enable( GL_BLEND );
menus = new ssgSimpleState;
+ menus->ref();
menus->disable( GL_CULL_FACE );
menus->disable( GL_TEXTURE_2D );
menus->enable( GL_BLEND );
tex_file.append( texture_name );
state = new ssgStateSelector(2);
+
textured = new ssgSimpleState();
+ textured->ref();
+
nontextured = new ssgSimpleState();
+ nontextured->ref();
// Set up the textured state
textured->setShadeModel( shade_model );
void FGNewMat::set_ssg_state( ssgSimpleState *s ) {
state = new ssgStateSelector(2);
textured = s;
+
nontextured = new ssgSimpleState();
+ nontextured->ref();
// Set up the coloured state
nontextured->enable( GL_LIGHTING );