Browse Source

fix GL lighting

David Rose 20 years ago
parent
commit
6cf53c9ebd
1 changed files with 5 additions and 0 deletions
  1. 5 0
      panda/src/display/graphicsStateGuardian.cxx

+ 5 - 0
panda/src/display/graphicsStateGuardian.cxx

@@ -1252,6 +1252,11 @@ do_issue_light() {
             enable_light(i, true);
             enable_light(i, true);
             _light_info[i]._enabled = true;
             _light_info[i]._enabled = true;
             _light_info[i]._next_enabled = true;
             _light_info[i]._next_enabled = true;
+          
+            if (!any_bound) {
+              begin_bind_lights();
+              any_bound = true;
+            }
             light_obj->bind(this, light, i);
             light_obj->bind(this, light, i);
             break;
             break;
           }
           }