build on linux

This commit is contained in:
David Rose 2008-01-26 01:15:25 +00:00
parent e0226e0cc3
commit 77f15e1885
3 changed files with 10 additions and 12 deletions

View File

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

View File

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

View File

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