]> git.mxchange.org Git - simgear.git/commitdiff
Make the vasi lights slightly larger/brighter.
authorcurt <curt>
Fri, 9 Jan 2004 16:49:13 +0000 (16:49 +0000)
committercurt <curt>
Fri, 9 Jan 2004 16:49:13 +0000 (16:49 +0000)
simgear/scene/tgdb/pt_lights.cxx

index 42eb4671bfe6880853d195e99ba31f36d7db0051..ed98df9631a931698750c21976a383befa9f7411 100644 (file)
@@ -34,7 +34,7 @@
 // strobe pre-draw (we want a larger point size)
 static int StrobePreDraw( ssgEntity *e ) {
     glPushAttrib( GL_POINT_BIT );
-    glPointSize(3.0);
+    glPointSize(4.0);
     glEnable(GL_POINT_SMOOTH);
 
     return true;
@@ -48,6 +48,23 @@ static int StrobePostDraw( ssgEntity *e ) {
 }
 
 
+// vasi pre-draw (we want a larger point size)
+static int VASIPreDraw( ssgEntity *e ) {
+    glPushAttrib( GL_POINT_BIT );
+    glPointSize(2.0);
+    glEnable(GL_POINT_SMOOTH);
+
+    return true;
+}
+
+// vasi post-draw (we want a larger point size)
+static int VASIPostDraw( ssgEntity *e ) {
+    glPopAttrib();
+
+    return true;
+}
+
+
 // Generate a directional light
 ssgLeaf *sgMakeDirectionalLight( sgVec3 pt, sgVec3 dir, sgVec3 up, 
                                  const SGMaterial *mat ) {
@@ -631,8 +648,8 @@ ssgBranch *sgMakeDirectionalLights( const point_list &nodes,
         // structure.
         ssgRangeSelector *lod = (ssgRangeSelector *)light_group->getKid(0);
         ssgLeaf *leaf = (ssgLeaf *)lod->getKid(0);
-        // leaf->setCallback( SSG_CALLBACK_PREDRAW, StrobePreDraw );
-        // leaf->setCallback( SSG_CALLBACK_POSTDRAW, StrobePostDraw );
+        leaf->setCallback( SSG_CALLBACK_PREDRAW, VASIPreDraw );
+        leaf->setCallback( SSG_CALLBACK_POSTDRAW, VASIPostDraw );
 
         SGVASIUserData *vasi = new SGVASIUserData( pos, leaf );