]> git.mxchange.org Git - simgear.git/commitdiff
Add #ifdef'd out support for plibs cheesy lens flare object.
authorcurt <curt>
Tue, 27 Aug 2002 21:43:35 +0000 (21:43 +0000)
committercurt <curt>
Tue, 27 Aug 2002 21:43:35 +0000 (21:43 +0000)
simgear/sky/oursun.cxx

index e423db02328fea5e5cbf8b7c71fa22f001720d5e..61255048fa6ce08178bd5c7d2c82606b886be853 100644 (file)
 // $Id$
 
 
+#ifdef HAVE_CONFIG_H
+#  include <simgear_config.h>
+#endif
+
 #include <simgear/compiler.h>
 
 #include <stdio.h>
 #include <plib/sg.h>
 #include <plib/ssg.h>
 
+#ifdef FG_CHEESY_LENS_FLARE
+#  include <plib/ssgaLensFlare.h>
+#endif
+
 #include "sphere.hxx"
 #include "oursun.hxx"
 
@@ -109,6 +117,8 @@ SGSun::~SGSun( void ) {
 
 
 #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 ) {
     int texSize;
     GLuint texid;
@@ -304,6 +314,16 @@ ssgBranch * SGSun::build( SGPath path, double sun_size ) {
     sun_transform->addKid( halo );
     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;
 }