Browse Source

build on linux

David Rose 18 years ago
parent
commit
77f15e1885

+ 4 - 6
panda/src/pgraph/geomTransformer.cxx

@@ -512,8 +512,6 @@ make_compatible_state(GeomNode *node) {
     return false;
     return false;
   }
   }
   
   
-  bool has_incompatible = false;
-  
   GeomNode::CDWriter cdata(node->_cycler);
   GeomNode::CDWriter cdata(node->_cycler);
   GeomNode::GeomList::iterator gi;
   GeomNode::GeomList::iterator gi;
   GeomNode::GeomList &geoms = *(cdata->modify_geoms());
   GeomNode::GeomList &geoms = *(cdata->modify_geoms());
@@ -521,10 +519,10 @@ make_compatible_state(GeomNode *node) {
   // For each geom, calculate a canonicalized RenderState, and 
   // For each geom, calculate a canonicalized RenderState, and 
   // classify all the geoms according to that.
   // classify all the geoms according to that.
   
   
-  typedef pmap <CPT(RenderState), pvector<int>> StateTable;
+  typedef pmap <CPT(RenderState), pvector<int> > StateTable;
   StateTable state_table;
   StateTable state_table;
   
   
-  for (int i=0; i<geoms.size(); i++) {
+  for (int i = 0; i < (int)geoms.size(); i++) {
     GeomNode::GeomEntry &entry = geoms[i];
     GeomNode::GeomEntry &entry = geoms[i];
     CPT(RenderState) canon = entry._state->add_attrib(ColorAttrib::make_vertex());
     CPT(RenderState) canon = entry._state->add_attrib(ColorAttrib::make_vertex());
     state_table[canon].push_back(i);
     state_table[canon].push_back(i);
@@ -541,7 +539,7 @@ make_compatible_state(GeomNode *node) {
     
     
     pvector<int> &indices = (*si).second;
     pvector<int> &indices = (*si).second;
     bool mismatch = false;
     bool mismatch = false;
-    for (int i=1; i<indices.size(); i++) {
+    for (int i = 1; i < (int)indices.size(); i++) {
       if (geoms[indices[i]]._state != geoms[indices[0]]._state) {
       if (geoms[indices[i]]._state != geoms[indices[0]]._state) {
         mismatch = true;
         mismatch = true;
         break;
         break;
@@ -555,7 +553,7 @@ make_compatible_state(GeomNode *node) {
     // since their canonicalized states are the same.  Canonicalize them.
     // since their canonicalized states are the same.  Canonicalize them.
     
     
     const RenderState *canon_state = (*si).first;
     const RenderState *canon_state = (*si).first;
-    for (int i=0; i<indices.size(); i++) {
+    for (int i = 0; i < (int)indices.size(); i++) {
       GeomNode::GeomEntry &entry = geoms[indices[i]];
       GeomNode::GeomEntry &entry = geoms[indices[i]];
       const RenderAttrib *ra = entry._state->get_attrib(ColorAttrib::get_class_type());
       const RenderAttrib *ra = entry._state->get_attrib(ColorAttrib::get_class_type());
       if (ra == (RenderAttrib *)NULL) {
       if (ra == (RenderAttrib *)NULL) {

+ 2 - 2
panda/src/pgraph/shaderAttrib.I

@@ -26,8 +26,8 @@ INLINE ShaderAttrib::
 ShaderAttrib() :
 ShaderAttrib() :
   _shader(NULL),
   _shader(NULL),
   _shader_priority(0),
   _shader_priority(0),
-  _has_shader(false),
-  _auto_shader(false)
+  _auto_shader(false),
+  _has_shader(false)
 {
 {
 }
 }
 
 

+ 4 - 4
panda/src/pgraph/shaderGenerator.cxx

@@ -58,7 +58,7 @@
 #include "ambientLight.h"
 #include "ambientLight.h"
 #include "directionalLight.h"
 #include "directionalLight.h"
 #include "pointLight.h"
 #include "pointLight.h"
-#include "spotLight.h"
+#include "spotlight.h"
 
 
 TypeHandle ShaderGenerator::_type_handle;
 TypeHandle ShaderGenerator::_type_handle;
 PT(ShaderGenerator) ShaderGenerator::_default_generator;
 PT(ShaderGenerator) ShaderGenerator::_default_generator;
@@ -377,10 +377,10 @@ synthesize_shader(const RenderState *rs) {
 
 
   char *pos_freg = 0;
   char *pos_freg = 0;
   char *normal_vreg = 0;
   char *normal_vreg = 0;
-  char *tangent_vreg = 0;
-  char *binormal_vreg = 0;
+  //  char *tangent_vreg = 0;
+  //  char *binormal_vreg = 0;
   char *normal_freg = 0;
   char *normal_freg = 0;
-  char *eyevec_freg = 0;
+  //  char *eyevec_freg = 0;
   pvector<char *> texcoord_vreg;
   pvector<char *> texcoord_vreg;
   pvector<char *> texcoord_freg;
   pvector<char *> texcoord_freg;
   pvector<char *> tslightvec_freg;
   pvector<char *> tslightvec_freg;