Browse Source

initialize flags

David Rose 17 years ago
parent
commit
a760c2ba4f
2 changed files with 3 additions and 12 deletions
  1. 3 1
      panda/src/pgraph/shaderAttrib.I
  2. 0 11
      panda/src/pgraph/shaderAttrib.cxx

+ 3 - 1
panda/src/pgraph/shaderAttrib.I

@@ -27,7 +27,9 @@ ShaderAttrib() :
   _shader(NULL),
   _shader_priority(0),
   _auto_shader(false),
-  _has_shader(false)
+  _has_shader(false),
+  _flags(0),
+  _has_flags(0)
 {
 }
 

+ 0 - 11
panda/src/pgraph/shaderAttrib.cxx

@@ -40,12 +40,7 @@ make_off() {
   static CPT(RenderAttrib) _off_attrib;
   if (_off_attrib == 0) {
     ShaderAttrib *attrib = new ShaderAttrib;
-    attrib->_shader = (Shader*)NULL;
-    attrib->_shader_priority = 0;
-    attrib->_auto_shader = false;
     attrib->_has_shader = true;
-    attrib->_flags = 0;
-    attrib->_has_flags = 0;
     _off_attrib = return_new(attrib);
   }
   return _off_attrib;
@@ -62,12 +57,6 @@ make() {
   static CPT(RenderAttrib) _null_attrib;
   if (_null_attrib == 0) {
     ShaderAttrib *attrib = new ShaderAttrib;
-    attrib->_shader = (Shader*)NULL;
-    attrib->_shader_priority = 0;
-    attrib->_auto_shader = false;
-    attrib->_has_shader = false;
-    attrib->_flags = 0;
-    attrib->_has_flags = 0;
     _null_attrib = return_new(attrib);
   }
   return _null_attrib;