ssgSimpleState *state;
state_sel = new ssgStateSelector( 2 );
+ state_sel->ref();
cloud_path.set(texture_path.str());
cloud_path.append("overcast.rgb");
state_sel->setStep( 0, sgCloudMakeState(cloud_path.str()) );
layer_states[SG_CLOUD_OVERCAST] = state_sel;
state_sel = new ssgStateSelector( 2 );
+ state_sel->ref();
cloud_path.set(texture_path.str());
cloud_path.append("broken.rgba");
state = sgCloudMakeState(cloud_path.str());
layer_states[SG_CLOUD_BROKEN] = state_sel;
state_sel = new ssgStateSelector( 2 );
+ state_sel->ref();
cloud_path.set(texture_path.str());
cloud_path.append("scattered.rgba");
state = sgCloudMakeState(cloud_path.str());
layer_states[SG_CLOUD_SCATTERED] = state_sel;
state_sel = new ssgStateSelector( 2 );
+ state_sel->ref();
cloud_path.set(texture_path.str());
cloud_path.append("few.rgba");
state = sgCloudMakeState(cloud_path.str());
layer_states[SG_CLOUD_FEW] = state_sel;
state_sel = new ssgStateSelector( 2 );
+ state_sel->ref();
cloud_path.set(texture_path.str());
cloud_path.append("cirrus.rgba");
state = sgCloudMakeState(cloud_path.str());
state->enable( GL_ALPHA_TEST );
state->setAlphaClamp( 0.01 );
- // ref() the state so it doesn't get deleted if the last layer of
- // it's type is deleted.
- state->ref();
-
return state;
}