diff --git a/Make/makedefs b/Make/makedefs index ea0a77331..cc58e6e87 100644 --- a/Make/makedefs +++ b/Make/makedefs @@ -122,7 +122,7 @@ ifeq ($(OS),IRIX) C++ = CC DEPFLAGS = -M - INC += -I${TOPDIR}/include + INC += -I${TOPDIR}/include -I/usr/freeware/ DEF += -LANG:std -OPT:Olimit=0 \ -DEBUG:woff=1682 -DEBUG:woff=3303\ -MDupdate $(MAKEDEPEND) @@ -250,17 +250,23 @@ ifeq ($(OS),Darwin) SOCKET_LIBS = OTHER_LIBS = -lm -ldl -lstdc++ -lobjc LIB_EXT = dylib - QUICKTIME_LIB = -framework QuickTime + QUICKTIME = -framework QuickTime $(CARBON_LIB) TIFF_LIB = -ltiff - SRC_DIRS = osg osgUtil osgDB osgGA osgGLUT osgParticle \ - osgPlugins Demos - PLUGIN_DIRS = osg rgb lib3ds flt obj lwo txp bmp pic tga \ - osgtgz tgz zip - DEMOS_DIRS = hangglide osgbillboard osgcluster osgconv osgcopy \ - osgcube osgcallback osgclip osgimpostor osgoccluder \ - osgreflect osgscribe osgstereoimage osgtexture \ - osgviews osgversion sgv osgparticle - + SRC_DIRS = osg osgUtil osgDB osgPlugins \ + osgGA osgGLUT osgParticle \ + Demos + # Plugins which require external libs: gif jpeg png + PLUGIN_DIRS = bmp dw flt \ + lib3ds logos lwo obj \ + osg osgtgz pic \ + quicktime rgb tga tgz tiff \ + txp zip + # Demos which require external libs: osghud osgtext + DEMOS_DIRS = osgbillboard osgcallback osgclip \ + osgcluster osgconv osgcopy osgcube osggeometry \ + osghangglide osgimpostor osgmultitexture osgoccluder \ + osgparticle osgprerender osgreflect osgscribe osgstereoimage \ + osgtexture osgversion osgviews sgv endif #### Cygwin/Mingw specific definitions diff --git a/Make/makedirdefs b/Make/makedirdefs index 5912f40f6..f6b32276e 100644 --- a/Make/makedirdefs +++ b/Make/makedirdefs @@ -76,6 +76,7 @@ DEMOS_DIRS = \ osghangglide\ osghud\ osgimpostor\ + osglight\ osgmultitexture\ osgoccluder\ osgparticle\ diff --git a/src/osgPlugins/dx/AreaGeoSetTriangulator.cpp b/src/osgPlugins/dx/AreaGeoSetTriangulator.cpp index 49f51ed48..3bb7a0cdc 100644 --- a/src/osgPlugins/dx/AreaGeoSetTriangulator.cpp +++ b/src/osgPlugins/dx/AreaGeoSetTriangulator.cpp @@ -245,13 +245,13 @@ void for_each_triangle2(const osg::GeoSet& gset,T& op) } else { - osg::uint* base = gset.getCoordIndices()._ptr._uint; - osg::uint* iptr = base; + GLuint* base = gset.getCoordIndices()._ptr._uint; + GLuint* iptr = base; const int numPrim = gset.getNumPrims(); for(int i=0; i0) { - osg::uint *start = iptr; - osg::uint* iend = iptr+primLength; + GLuint *start = iptr; + GLuint* iend = iptr+primLength; ++iptr; for(int j = 2; j < primLength; ++j ) { @@ -587,20 +587,20 @@ osg::GeoSet *AreaGeoSetTriangulator::BuildGeoSet() sizeof(osg::Vec2) * _area_geoset.getNumTextureCoords() ); // Now generate the index arrays - osg::uint *new_cindex = 0; - osg::uint *new_nindex = 0; - osg::uint *new_colindex = 0; - osg::uint *new_tindex = 0; + GLuint *new_cindex = 0; + GLuint *new_nindex = 0; + GLuint *new_colindex = 0; + GLuint *new_tindex = 0; - if ( _cindex.size() ) new_cindex = new osg::uint[ _cindex.size() ]; - if ( _nindex.size() ) new_nindex = new osg::uint[ _nindex.size() ]; - if ( _colindex.size() ) new_colindex = new osg::uint[ _colindex.size() ]; - if ( _tindex.size() ) new_tindex = new osg::uint[ _tindex.size() ]; + if ( _cindex.size() ) new_cindex = new GLuint[ _cindex.size() ]; + if ( _nindex.size() ) new_nindex = new GLuint[ _nindex.size() ]; + if ( _colindex.size() ) new_colindex = new GLuint[ _colindex.size() ]; + if ( _tindex.size() ) new_tindex = new GLuint[ _tindex.size() ]; - memcpy( new_cindex , &_cindex [0], sizeof(osg::uint) * _cindex.size() ); - memcpy( new_nindex , &_nindex [0], sizeof(osg::uint) * _nindex.size() ); - memcpy( new_colindex, &_colindex[0], sizeof(osg::uint) * _colindex.size() ); - memcpy( new_tindex , &_tindex [0], sizeof(osg::uint) * _tindex.size() ); + memcpy( new_cindex , &_cindex [0], sizeof(GLuint) * _cindex.size() ); + memcpy( new_nindex , &_nindex [0], sizeof(GLuint) * _nindex.size() ); + memcpy( new_colindex, &_colindex[0], sizeof(GLuint) * _colindex.size() ); + memcpy( new_tindex , &_tindex [0], sizeof(GLuint) * _tindex.size() ); res->setCoords ( new_coords , new_cindex ); res->setNormals( new_normals, new_nindex ); diff --git a/src/osgPlugins/dx/DXWriter.cpp b/src/osgPlugins/dx/DXWriter.cpp index 6aabfa3b0..95d2a7a1d 100644 --- a/src/osgPlugins/dx/DXWriter.cpp +++ b/src/osgPlugins/dx/DXWriter.cpp @@ -819,7 +819,7 @@ void DXArrayWriter::WriteIndexArray( fprintf( fp, " " ); { if ( ip.null() ) fprintf( fp, " %d", i ); - else fprintf( fp, " %d", ip[i] ); + else fprintf( fp, " %d", static_cast( ip[i] ) ); } if ( (i+1) % shape == 0 ) fprintf( fp, "\n" ); @@ -1106,18 +1106,17 @@ void DXArrayWriter::WritePerVertexColors( // same applies here, namely that there may be multiple colors // mapping to the same point definiton.) - int num_points = geoset.getNumCoords(); - int num_pindices = geoset.getNumCoordIndices(); - int num_colors = geoset.getNumColors(); - int num_cindices = geoset.getNumColorIndices(); - //const osg::Vec3 *points = geoset.getCoords(); + unsigned int num_points = geoset.getNumCoords(); + unsigned int num_pindices = geoset.getNumCoordIndices(); + unsigned int num_colors = geoset.getNumColors(); + unsigned int num_cindices = geoset.getNumColorIndices(); const osg::Vec4 *colors = geoset.getColors(); const osg::GeoSet::IndexPointer &pindices = geoset.getCoordIndices(); const osg::GeoSet::IndexPointer &cindices = geoset.getColorIndices(); // Create a list of color indices per vertex "definition" - osg::uint *pt_cindices = new osg::uint[ num_points ]; - int *set = new int [ num_points ]; + GLuint *pt_cindices = new GLuint[ num_points ]; + int *set = new int[ num_points ]; try { memset( set, '\0', num_points * sizeof(int) ); @@ -1547,7 +1546,7 @@ void DXWriter::WritePolylineConnections( osg::GeoSet &geoset, int count = 0; for ( i = 0; i < num_prims; i++ ) count += ( line_loops ? prim_lengths[i]+1 : prim_lengths[i] ); - osg::uint *indices = new osg::uint[ count ]; + GLuint *indices = new GLuint[ count ]; osg::GeoSet::IndexPointer ip; ip.set( count, indices ); diff --git a/src/osgPlugins/logos/Makefile b/src/osgPlugins/logos/Makefile index d528d0a5a..ccea33bfa 100644 --- a/src/osgPlugins/logos/Makefile +++ b/src/osgPlugins/logos/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ ReaderWriterLOGO.cpp\ -LIBS += $(OSG_LIBS) $(OTHER_LIBS) +LIBS += $(OSG_LIBS) $(GL_LIBS) $(OTHER_LIBS) TARGET_BASENAME = logo include $(TOPDIR)/Make/cygwin_plugin_def diff --git a/src/osgPlugins/logos/ReaderWriterLOGO.cpp b/src/osgPlugins/logos/ReaderWriterLOGO.cpp index 58d54ff29..efa87544d 100644 --- a/src/osgPlugins/logos/ReaderWriterLOGO.cpp +++ b/src/osgPlugins/logos/ReaderWriterLOGO.cpp @@ -35,7 +35,7 @@ class Logos: public osg::Drawable struct logosCullCallback : public osg::Drawable::CullCallback { - virtual bool cull(osg::NodeVisitor *visitor, osg::Drawable* drawable, osg::State *state=NULL) const + virtual bool cull(osg::NodeVisitor *visitor, osg::Drawable* drawable, osg::State*) const { Logos *logos = dynamic_cast (drawable); osgUtil::CullVisitor *cv = dynamic_cast(visitor);