- state = new ssgSimpleState();
- state->ref();
-
- // Set up the textured state
- state->setShadeModel( shade_model );
- state->enable( GL_LIGHTING );
- state->enable ( GL_CULL_FACE ) ;
- state->enable( GL_TEXTURE_2D );
- state->disable( GL_BLEND );
- state->disable( GL_ALPHA_TEST );
- if ( !defer_tex_load ) {
- SG_LOG(SG_INPUT, SG_INFO, " " << texture_path );
- state->setTexture( (char *)texture_path.c_str(), wrapu, wrapv );
- texture_loaded = true;
- } else {
- texture_loaded = false;
- }
- state->enable( GL_COLOR_MATERIAL );
- state->setMaterial ( GL_AMBIENT,
- ambient[0], ambient[1],
- ambient[2], ambient[3] ) ;
- state->setMaterial ( GL_DIFFUSE,
+ for (int i = 0; i < _status.size(); i++)
+ {
+ ssgSimpleState *state = new ssgSimpleState();
+ state->ref();
+
+ // Set up the textured state
+ state->setShadeModel( shade_model );
+ state->enable( GL_LIGHTING );
+ state->enable ( GL_CULL_FACE ) ;
+ state->enable( GL_TEXTURE_2D );
+ state->disable( GL_BLEND );
+ state->disable( GL_ALPHA_TEST );
+
+ if ( !defer_tex_load ) {
+ SG_LOG(SG_INPUT, SG_INFO, " " << _status[i].texture_path );
+ state->setTexture( (char *)_status[i].texture_path.c_str(),
+ wrapu, wrapv );
+ _status[i].texture_loaded = true;
+ } else {
+ _status[i].texture_loaded = false;
+ }
+
+ state->enable( GL_COLOR_MATERIAL );
+ state->setMaterial ( GL_AMBIENT,
+ ambient[0], ambient[1],
+ ambient[2], ambient[3] ) ;
+ state->setMaterial ( GL_DIFFUSE,