Add #ifdef'd out support for plibs cheesy lens flare object.

This commit is contained in:
curt 2002-08-27 21:43:35 +00:00
parent a885314a39
commit b3a533f8ce

View File

@ -25,6 +25,10 @@
// $Id$ // $Id$
#ifdef HAVE_CONFIG_H
# include <simgear_config.h>
#endif
#include <simgear/compiler.h> #include <simgear/compiler.h>
#include <stdio.h> #include <stdio.h>
@ -33,6 +37,10 @@
#include <plib/sg.h> #include <plib/sg.h>
#include <plib/ssg.h> #include <plib/ssg.h>
#ifdef FG_CHEESY_LENS_FLARE
# include <plib/ssgaLensFlare.h>
#endif
#include "sphere.hxx" #include "sphere.hxx"
#include "oursun.hxx" #include "oursun.hxx"
@ -109,6 +117,8 @@ SGSun::~SGSun( void ) {
#if 0 #if 0
// this might be nice to keep, just as an example of how to generate a
// texture on the fly ...
static GLuint makeHalo( GLubyte *sun_texbuf, int width ) { static GLuint makeHalo( GLubyte *sun_texbuf, int width ) {
int texSize; int texSize;
GLuint texid; GLuint texid;
@ -304,6 +314,16 @@ ssgBranch * SGSun::build( SGPath path, double sun_size ) {
sun_transform->addKid( halo ); sun_transform->addKid( halo );
sun_transform->addKid( orb ); sun_transform->addKid( orb );
#if 0
// enable this code to add a super cheesy lens flare effect to the sun.
# ifdef FG_PLIB_SUPPORTS_LENS_FLARE
// cheesy lens flair
sun_transform->addKid( new ssgaLensFlare );
# endif
#endif
return sun_transform; return sun_transform;
} }