From Mike Weiblen, build fixes for Windows.
This commit is contained in:
@@ -226,8 +226,8 @@ struct BaseTypeConverters<x, reflected_type, true>
|
||||
|
||||
#define I_PublicMemberProperty(t, n) \
|
||||
cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, 0, 0)); \
|
||||
cap->addAttribute(new osgIntrospection::CustomPropertyGetAttribute(new osgIntrospection::PublicMemberAccessor<reflected_type, t>(&reflected_type::n))); \
|
||||
cap->addAttribute(new osgIntrospection::CustomPropertySetAttribute(new osgIntrospection::PublicMemberAccessor<reflected_type, t>(&reflected_type::n)));
|
||||
cap->addAttribute(new osgIntrospection::CustomPropertyGetAttribute(new osgIntrospection::PublicMemberAccessor< reflected_type, t >(&reflected_type::n))); \
|
||||
cap->addAttribute(new osgIntrospection::CustomPropertySetAttribute(new osgIntrospection::PublicMemberAccessor< reflected_type, t >(&reflected_type::n)));
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
@@ -44,7 +44,7 @@ set the env vars:
|
||||
|
||||
COLLADA_DEBUG_LIBS = yes
|
||||
|
||||
Note, Collda svn trunk currently defaults to debug build.
|
||||
Note, Collada svn trunk currently defaults to debug build.
|
||||
|
||||
The above env vars can also be setup in your own custom Make/depdendencies file (copy this and point
|
||||
to the locally modified copy using the env var OSG_DEPENDCIES so the the OSG's build system can find
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <dom/domGeometry.h>
|
||||
#include <dom/domConstants.h>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
using namespace osgdae;
|
||||
|
||||
//GEODE
|
||||
@@ -324,13 +326,10 @@ bool daeWriter::processGeometry( osg::Geometry *geom, domGeometry *geo, const st
|
||||
//TODO: Do the same as normal and colors for texcoods. But in a loop since you can have many
|
||||
for ( unsigned int ti = 0; ti < texcoords.size(); ti++ )
|
||||
{
|
||||
char intstr[6];
|
||||
#if 0
|
||||
itoa( ti, intstr, 10 );
|
||||
#else
|
||||
snprintf(intstr,6,"%d",ti);
|
||||
#endif
|
||||
sName = name + "-texcoord_" + intstr;
|
||||
std::ostringstream intstr;
|
||||
intstr << std::dec << ti;
|
||||
sName = name + "-texcoord_" + intstr.str();
|
||||
|
||||
domSource *t = createSource( mesh, sName, texcoords[ti].mode, false, true );
|
||||
switch( texcoords[ti].mode )
|
||||
{
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include <dom/domConstants.h>
|
||||
#include <dom/domProfile_COMMON.h>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
//#include <dom/domLibrary_effects.h>
|
||||
//#include <dom/domLibrary_materials.h>
|
||||
|
||||
@@ -305,21 +307,10 @@ void daeWriter::processMaterial( osg::StateSet *ss, domInstance_geometry *ig, co
|
||||
domTechnique *teq = daeSafeCast< domTechnique >( extra->createAndPlace( COLLADA_ELEMENT_TECHNIQUE ) );
|
||||
teq->setProfile( "SCEI" );
|
||||
domAny *any = (domAny*)(daeElement*)teq->createAndPlace( "color" );
|
||||
char colVal[256];
|
||||
colVal[0] = 0;
|
||||
for ( unsigned int i = 0; i < 4; i++ )
|
||||
{
|
||||
char val[16];
|
||||
#if 0
|
||||
itoa( dCol[i], val, 10 );
|
||||
#else
|
||||
snprintf(val,16,"%d",int(dCol[i]));
|
||||
#endif
|
||||
//strncat( colVal, val,256 );
|
||||
strncat( colVal, " ",256 );
|
||||
}
|
||||
any->setValue( colVal );
|
||||
|
||||
|
||||
std::ostringstream colVal;
|
||||
colVal << std::dec << " " << int(dCol[0]) << " " << int(dCol[1]) << " " << int(dCol[2]) << " " << int(dCol[3]);
|
||||
any->setValue( colVal.str().c_str() );
|
||||
}
|
||||
|
||||
cot = daeSafeCast< domCommon_color_or_texture_type >( phong->createAndPlace( "specular" ) );
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include <dom/domNode.h>
|
||||
#include <dom/domConstants.h>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
using namespace osgdae;
|
||||
|
||||
daeWriter::daeWriter( const std::string &fname,bool _usePolygons ) : osg::NodeVisitor( TRAVERSE_ALL_CHILDREN ),
|
||||
@@ -121,13 +123,9 @@ std::string daeWriter::uniquify( const std::string &name )
|
||||
if ( iter != uniqueNames.end() )
|
||||
{
|
||||
iter->second++;
|
||||
char str[5];
|
||||
#if 0
|
||||
itoa( iter->second, str, 10 );
|
||||
#else
|
||||
snprintf(str,5,"%d",iter->second);
|
||||
#endif
|
||||
return name + "_" + str;
|
||||
std::ostringstream num;
|
||||
num << std::dec << iter->second;
|
||||
return name + "_" + num.str();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user