Panda3D
|
00001 // Filename: tinyGraphicsStateGuardian.I 00002 // Created by: drose (24Apr08) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 //////////////////////////////////////////////////////////////////// 00017 // Function: TinyGraphicsStateGuardian::clear_light_state 00018 // Access: Private 00019 // Description: Removes the current list of active lights from the 00020 // current state context. 00021 //////////////////////////////////////////////////////////////////// 00022 INLINE void TinyGraphicsStateGuardian:: 00023 clear_light_state() { 00024 _c->lighting_enabled = false; 00025 #ifndef NDEBUG 00026 GLLight *gl_light = _c->first_light; 00027 while (gl_light != (GLLight *)NULL) { 00028 GLLight *next = gl_light->next; 00029 gl_light->next = NULL; 00030 gl_light = next; 00031 } 00032 #endif // NDEBUG 00033 _c->first_light = NULL; 00034 }