tinyGraphicsStateGuardian.I 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Filename: tinyGraphicsStateGuardian.I
  2. // Created by: drose (24Apr08)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) Carnegie Mellon University. All rights reserved.
  8. //
  9. // All use of this software is subject to the terms of the revised BSD
  10. // license. You should have received a copy of this license along
  11. // with this source code in a file named "LICENSE."
  12. //
  13. ////////////////////////////////////////////////////////////////////
  14. ////////////////////////////////////////////////////////////////////
  15. // Function: TinyGraphicsStateGuardian::clear_light_state
  16. // Access: Private
  17. // Description: Removes the current list of active lights from the
  18. // current state context.
  19. ////////////////////////////////////////////////////////////////////
  20. INLINE void TinyGraphicsStateGuardian::
  21. clear_light_state() {
  22. _c->lighting_enabled = false;
  23. #ifndef NDEBUG
  24. GLLight *gl_light = _c->first_light;
  25. while (gl_light != (GLLight *)NULL) {
  26. GLLight *next = gl_light->next;
  27. gl_light->next = NULL;
  28. gl_light = next;
  29. }
  30. #endif // NDEBUG
  31. _c->first_light = NULL;
  32. }