#include "renderer.hxx"
static const char *progress_text = 0;
-static SGTexture splash;
+static SGTexture *splash = new SGTexture;
SGPropertyNode_ptr style = 0;
if (!fgGetBool("/sim/startup/splash-screen"))
return;
- splash.bind();
+ splash->bind();
SGPath tpath( globals->get_fg_root() );
if (splash_texture == NULL || !strcmp(splash_texture, "")) {
} else
tpath.append( splash_texture );
- splash.read_rgba_texture(tpath.c_str());
- if (!splash.usable())
+ splash->read_rgba_texture(tpath.c_str());
+ if (!splash->usable())
{
// Try compressed
SGPath fg_tpath = tpath;
fg_tpath.concat( ".gz" );
- splash.read_rgba_texture(fg_tpath.c_str());
- if ( !splash.usable() )
+ splash->read_rgba_texture(fg_tpath.c_str());
+ if ( !splash->usable() )
{
SG_LOG( SG_GENERAL, SG_ALERT,
"Error in loading splash screen texture " << tpath.str() );
}
}
- splash.select();
+ splash->select();
+}
+
+
+void fgSplashExit ()
+{
+ delete splash;
+ splash = 0;
}
// now draw the logo
if (fgGetBool("/sim/startup/splash-screen", true)) {
glEnable(GL_TEXTURE_2D);
- splash.bind();
+ splash->bind();
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glColor4f( 1.0, 1.0, 1.0, alpha );
void fgSplashUpdate ( float alpha );
// Set progress information
-void fgSplashProgress( const char *text );
+void fgSplashProgress ( const char *text );
+
+// Free texture memory
+void fgSplashExit ();
#endif // _SPLASH_HXX