Removed include/osg/Types header defining osg::ubyte, osg::ushort etc. Changed
any reference to these in the distribution across to using unsigned char, unsigned short etc. This has been done to keep the OSG code more opaque to what types are.
This commit is contained in:
@@ -833,10 +833,6 @@ SOURCE=..\..\Include\Osg\BlendFunc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Include\Osg\Types
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Include\Osg\UnitTestFramework
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <osg/Export>
|
||||
#include <osg/StateAttribute>
|
||||
#include <osg/Types>
|
||||
|
||||
namespace osg {
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#define OSG_DEPTH 1
|
||||
|
||||
#include <osg/StateAttribute>
|
||||
#include <osg/Types>
|
||||
|
||||
namespace osg {
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <osg/BoundingBox>
|
||||
#include <osg/State>
|
||||
#include <osg/Types>
|
||||
#include <osg/NodeVisitor>
|
||||
#include <osg/Shape>
|
||||
#include <osg/buffered_value>
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#define OSG_FOG 1
|
||||
|
||||
#include <osg/StateAttribute>
|
||||
#include <osg/Types>
|
||||
#include <osg/Vec4>
|
||||
|
||||
#ifndef GL_FOG_COORDINATE
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#define OSG_STENCIL 1
|
||||
|
||||
#include <osg/StateAttribute>
|
||||
#include <osg/Types>
|
||||
|
||||
namespace osg {
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#define OSG_TEXTURE 1
|
||||
|
||||
#include <osg/GL>
|
||||
#include <osg/Types>
|
||||
#include <osg/Image>
|
||||
#include <osg/StateAttribute>
|
||||
#include <osg/ref_ptr>
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2003 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef OSG_TYPES
|
||||
#define OSG_TYPES 1
|
||||
|
||||
namespace osg {
|
||||
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned char uchar;
|
||||
typedef uchar ubyte;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -15,7 +15,6 @@
|
||||
#define OSG_VIEWPORT 1
|
||||
|
||||
#include <osg/StateAttribute>
|
||||
#include <osg/Types>
|
||||
#include <osg/Matrix>
|
||||
|
||||
namespace osg {
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#ifndef OSGDB_FIELD
|
||||
#define OSGDB_FIELD 1
|
||||
|
||||
#include <osg/Types>
|
||||
#include <osgDB/Export>
|
||||
|
||||
#include <string>
|
||||
@@ -83,8 +82,8 @@ class OSGDB_EXPORT Field
|
||||
bool getInt(int& i) const;
|
||||
|
||||
bool isUInt() const;
|
||||
bool matchUInt(osg::uint i) const;
|
||||
bool getUInt(osg::uint& i) const;
|
||||
bool matchUInt(unsigned int i) const;
|
||||
bool getUInt(unsigned int& i) const;
|
||||
|
||||
bool isFloat() const;
|
||||
bool matchFloat(float f) const;
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <osg/State>
|
||||
|
||||
#include <osgText/Export>
|
||||
#include <osgText/EncodedText>
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -57,8 +58,6 @@ namespace osgText {
|
||||
virtual const char* libraryName() const { return #library; } \
|
||||
virtual const char* className() const { return #name; } \
|
||||
|
||||
class EncodedText;
|
||||
|
||||
class OSGTEXT_EXPORT Font : public osg::Object
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include <osg/Vec2>
|
||||
|
||||
#include <osgText/Font>
|
||||
#include <osgText/EncodedText>
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "GliderManipulator.h"
|
||||
|
||||
#include <osg/Types>
|
||||
#include <osg/Notify>
|
||||
|
||||
using namespace osg;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "TestManipulator.h"
|
||||
#include <osg/Types>
|
||||
#include <osg/Notify>
|
||||
|
||||
using namespace osg;
|
||||
|
||||
@@ -63,7 +63,7 @@ class Texture2DCallback : public osg::NodeCallback
|
||||
|
||||
osg::ref_ptr<osg::Texture2D> _texture;
|
||||
std::vector<osg::Texture2D::FilterMode> _filterRange;
|
||||
osg::uint _currPos;
|
||||
unsigned int _currPos;
|
||||
double _prevTime;
|
||||
};
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
*/
|
||||
#include <osg/GL>
|
||||
#include <osg/Camera>
|
||||
#include <osg/Types>
|
||||
#include <osg/Notify>
|
||||
#include <osg/State>
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <osg/Matrix>
|
||||
#include <osg/Quat>
|
||||
#include <osg/Notify>
|
||||
#include <osg/Types>
|
||||
#include <osg/Math>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <osg/Quat>
|
||||
#include <osg/Vec4>
|
||||
#include <osg/Vec3>
|
||||
#include <osg/Types>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ using namespace osg;
|
||||
// by completely deleted once the appropriate OpenGL context
|
||||
// is set.
|
||||
typedef std::vector<GLuint> TextureObjectVector;
|
||||
typedef std::map<osg::uint,TextureObjectVector> DeletedTextureObjectCache;
|
||||
typedef std::map<unsigned int,TextureObjectVector> DeletedTextureObjectCache;
|
||||
static DeletedTextureObjectCache s_deletedTextureObjectCache;
|
||||
|
||||
|
||||
|
||||
@@ -297,12 +297,12 @@ bool Field::isUInt() const
|
||||
}
|
||||
|
||||
|
||||
bool Field::matchUInt(osg::uint i) const
|
||||
bool Field::matchUInt(unsigned int i) const
|
||||
{
|
||||
getFieldType();
|
||||
if (_fieldType==INTEGER)
|
||||
{
|
||||
return (osg::uint) strtoul(_fieldCache,NULL,0)==i;
|
||||
return (unsigned int) strtoul(_fieldCache,NULL,0)==i;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -311,7 +311,7 @@ bool Field::matchUInt(osg::uint i) const
|
||||
}
|
||||
|
||||
|
||||
bool Field::getUInt(osg::uint& i) const
|
||||
bool Field::getUInt(unsigned int& i) const
|
||||
{
|
||||
getFieldType();
|
||||
if (_fieldType==INTEGER)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include <osgGA/FlightManipulator>
|
||||
#include <osg/Types>
|
||||
#include <osg/Notify>
|
||||
|
||||
using namespace osg;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include <osgGA/TrackballManipulator>
|
||||
#include <osg/Types>
|
||||
#include <osg/Notify>
|
||||
|
||||
using namespace osg;
|
||||
|
||||
@@ -589,9 +589,9 @@ osg::Group *ac_load_object(FILE *f,const ACObject *parent)
|
||||
/** calc surface normal **/
|
||||
if (asurf.num_vertref >= 3) {
|
||||
osg::Vec3 norm;
|
||||
osg::ushort i1=(*nusidx)[0];
|
||||
osg::ushort i2=(*nusidx)[1];
|
||||
osg::ushort i3=(*nusidx)[2];
|
||||
unsigned short i1=(*nusidx)[0];
|
||||
unsigned short i2=(*nusidx)[1];
|
||||
unsigned short i3=(*nusidx)[2];
|
||||
osgtri_calc_normal((*vertpool)[i1],
|
||||
(*vertpool)[i2],
|
||||
(*vertpool)[i3], norm);
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
|
||||
#pragma warning (disable : 4786)
|
||||
#endif
|
||||
|
||||
#include "directx.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -291,7 +291,7 @@ public:
|
||||
}
|
||||
// mx.postScale(mx,1.0f/themat->TextureWidth, 1.0f/themat->TextureHeight,1);
|
||||
}
|
||||
inline int setnvop(const osg::ushort n) { // add a new hole in this face with n vertices
|
||||
inline int setnvop(const unsigned short n) { // add a new hole in this face with n vertices
|
||||
_face *oldop=opening;
|
||||
opening=new _face[nop+1];
|
||||
for (int i=0; i<nop; i++) opening[i].move(&oldop[i]);
|
||||
@@ -433,9 +433,9 @@ public:
|
||||
GLenum mode[]= {GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN,
|
||||
GL_QUADS, GL_QUAD_STRIP, GL_POLYGON};
|
||||
curmode=mode[md];
|
||||
gsidx=new osg::ushort[6*nfnvf];
|
||||
nrmidx=new osg::ushort[6*nfnvf];
|
||||
txidx=new osg::ushort[6*nfnvf];
|
||||
gsidx=new unsigned short[6*nfnvf];
|
||||
nrmidx=new unsigned short[6*nfnvf];
|
||||
txidx=new unsigned short[6*nfnvf];
|
||||
txcoords=new Vec2[6*nfnvf]; // one texture coord per vertex
|
||||
nrms=new Vec3[6*nfnvf]; // one normal per face or per vertex
|
||||
primlengs=new int[nfnvf]; // primitive lengths
|
||||
@@ -452,9 +452,9 @@ public:
|
||||
if (nload>0 && nff>0) { // there are some strips of this type
|
||||
Geode *geode = new Geode;
|
||||
GeoSet *gset = new GeoSet;
|
||||
osg::ushort *nunrmidx=new osg::ushort[nload];
|
||||
osg::ushort *nutxidx = new osg::ushort[nload];
|
||||
osg::ushort *nusidx = new osg::ushort[nload];
|
||||
unsigned short *nunrmidx=new unsigned short[nload];
|
||||
unsigned short *nutxidx = new unsigned short[nload];
|
||||
unsigned short *nusidx = new unsigned short[nload];
|
||||
Vec3 *nunrms=new Vec3[nload]; // one normal per face (nff) or per vertex (nload)
|
||||
int *nuprimlengs=new int[nff]; // primitive lengths
|
||||
Vec2 *nutxc=new Vec2[nload];
|
||||
@@ -551,9 +551,9 @@ private:
|
||||
int nload; // numebr of vertices loaded into these arrays
|
||||
int nff; // primitive loaded
|
||||
int *primlengs;
|
||||
osg::ushort *gsidx;
|
||||
osg::ushort *nrmidx;
|
||||
osg::ushort *txidx;
|
||||
unsigned short *gsidx;
|
||||
unsigned short *nrmidx;
|
||||
unsigned short *txidx;
|
||||
Vec3 *nrms; // one normal per face
|
||||
Vec2 *txcoords; // one texture coord per vertex
|
||||
const Matrix *tmat; // local texture matrix, or may be NULL for default mapping
|
||||
@@ -628,8 +628,8 @@ public:
|
||||
{ // read up to nexpected openings, each opening may have a number of vertices
|
||||
char buff[256];
|
||||
openings=new int[nexpected*2];
|
||||
fc1=new osg::ushort[nexpected];
|
||||
fc2=new osg::ushort[nexpected];
|
||||
fc1=new unsigned short[nexpected];
|
||||
fc2=new unsigned short[nexpected];
|
||||
nopens=0;
|
||||
int nvop=0; // current number of vertices in hole in object
|
||||
while (nopens<nexpected) { // for each opening
|
||||
@@ -755,13 +755,13 @@ private:
|
||||
Vec4 colour;
|
||||
std::vector<Vec3> verts;
|
||||
dwmaterial *themat;
|
||||
osg::ushort nverts,nfaces,nedges;
|
||||
osg::ushort nfaceverts;
|
||||
osg::ushort nopens;
|
||||
unsigned short nverts,nfaces,nedges;
|
||||
unsigned short nfaceverts;
|
||||
unsigned short nopens;
|
||||
_face *faces;
|
||||
_dwedge *edges;
|
||||
int *openings;
|
||||
osg::ushort *fc1, *fc2; // openings[i] is in faces[fc1[i]] to faces[fc2[i]]
|
||||
unsigned short *fc1, *fc2; // openings[i] is in faces[fc1[i]] to faces[fc2[i]]
|
||||
Matrix *tmat;
|
||||
Matrix *mx; // current uvw transform for currently tessealting face
|
||||
};
|
||||
@@ -895,7 +895,7 @@ class ReaderWriterDW : public osgDB::ReaderWriter
|
||||
{
|
||||
_dwobj obj;
|
||||
enum reading {NONE, MATERIAL, OBJECT};
|
||||
//osg::ushort nrecs=0; // number of records read after a divider (numVerts, numFaces, numOpenings...)
|
||||
//unsigned short nrecs=0; // number of records read after a divider (numVerts, numFaces, numOpenings...)
|
||||
int nexpected=0; // number of records to be read in a block
|
||||
dwmaterial *matpalet=NULL;
|
||||
int nmat=-1; // current element of matpalet being modified
|
||||
|
||||
@@ -12,19 +12,19 @@ class AreaGeoSetTriangulator
|
||||
// Efficiently collects the various data arrays, which GeoSet can't do.
|
||||
{
|
||||
protected:
|
||||
std::vector< osg::uint > _cindex;
|
||||
std::vector< osg::uint > _nindex;
|
||||
std::vector< osg::uint > _colindex;
|
||||
std::vector< osg::uint > _tindex;
|
||||
std::vector< unsigned int > _cindex;
|
||||
std::vector< unsigned int > _nindex;
|
||||
std::vector< unsigned int > _colindex;
|
||||
std::vector< unsigned int > _tindex;
|
||||
const osg::GeoSet &_area_geoset;
|
||||
|
||||
public:
|
||||
AreaGeoSetTriangulator( const osg::GeoSet &area_geoset );
|
||||
|
||||
void operator() ( osg::uint v1, osg::uint v2, osg::uint v3,
|
||||
osg::uint prim_index, osg::uint prim_tri_index,
|
||||
osg::uint v1_geoset, osg::uint v2_geoset,
|
||||
osg::uint v3_geoset );
|
||||
void operator() ( unsigned int v1, unsigned int v2, unsigned int v3,
|
||||
unsigned int prim_index, unsigned int prim_tri_index,
|
||||
unsigned int v1_geoset, unsigned int v2_geoset,
|
||||
unsigned int v3_geoset );
|
||||
// Passed triangles as primitives are triangulated
|
||||
|
||||
osg::GeoSet *BuildGeoSet();
|
||||
@@ -58,10 +58,10 @@ AreaGeoSetTriangulator::AreaGeoSetTriangulator( const osg::GeoSet &area_geoset)
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
void AreaGeoSetTriangulator::operator() (
|
||||
osg::uint v1, osg::uint v2, osg::uint v3,
|
||||
osg::uint prim_index, osg::uint prim_tri_index,
|
||||
osg::uint v1_geoset, osg::uint v2_geoset,
|
||||
osg::uint v3_geoset )
|
||||
unsigned int v1, unsigned int v2, unsigned int v3,
|
||||
unsigned int prim_index, unsigned int prim_tri_index,
|
||||
unsigned int v1_geoset, unsigned int v2_geoset,
|
||||
unsigned int v3_geoset )
|
||||
// Passed triangles as primitives are triangulated from the original
|
||||
// GeoSet. Note that the v? params are indicies into the Coord array,
|
||||
// whereas the v?_geoset params are vertex numbers relative to the
|
||||
@@ -222,13 +222,13 @@ void for_each_triangle2(const osg::GeoSet& gset,T& op)
|
||||
{
|
||||
if (gset.getCoordIndices()._is_ushort)
|
||||
{
|
||||
osg::ushort* base = gset.getCoordIndices()._ptr._ushort;
|
||||
osg::ushort* iptr = base;
|
||||
unsigned short* base = gset.getCoordIndices()._ptr._ushort;
|
||||
unsigned short* iptr = base;
|
||||
const int numPrim = gset.getNumPrims();
|
||||
for(int i=0; i<numPrim; ++i )
|
||||
{
|
||||
const int primLength = gset.getPrimLengths()[i];
|
||||
osg::ushort* iend = iptr+primLength;
|
||||
unsigned short* iend = iptr+primLength;
|
||||
int tri=0;
|
||||
for(int j = 2; j < primLength; j++ )
|
||||
{
|
||||
@@ -269,12 +269,12 @@ void for_each_triangle2(const osg::GeoSet& gset,T& op)
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::uint cindex = 0;
|
||||
unsigned int cindex = 0;
|
||||
const int numPrim = gset.getNumPrims();
|
||||
for(int i=0; i<numPrim; ++i )
|
||||
{
|
||||
const int primLength = gset.getPrimLengths()[i];
|
||||
osg::uint cindex_end = cindex+primLength;
|
||||
unsigned int cindex_end = cindex+primLength;
|
||||
int tri=0;
|
||||
for(int j = 2; j < primLength; j++ )
|
||||
{
|
||||
@@ -298,8 +298,8 @@ void for_each_triangle2(const osg::GeoSet& gset,T& op)
|
||||
{
|
||||
if (gset.getCoordIndices()._is_ushort)
|
||||
{
|
||||
osg::ushort* base = gset.getCoordIndices()._ptr._ushort;
|
||||
osg::ushort* iptr = base;
|
||||
unsigned short* base = gset.getCoordIndices()._ptr._ushort;
|
||||
unsigned short* iptr = base;
|
||||
const int numPrim = gset.getNumPrims();
|
||||
for(int i=0; i<numPrim; ++i )
|
||||
{
|
||||
@@ -323,7 +323,7 @@ void for_each_triangle2(const osg::GeoSet& gset,T& op)
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::uint cindex = 0;
|
||||
unsigned int cindex = 0;
|
||||
const int numPrim = gset.getNumPrims();
|
||||
for(int i=0; i<numPrim; ++i )
|
||||
{
|
||||
@@ -341,13 +341,13 @@ void for_each_triangle2(const osg::GeoSet& gset,T& op)
|
||||
{
|
||||
if (gset.getCoordIndices()._is_ushort)
|
||||
{
|
||||
osg::ushort* base = gset.getCoordIndices()._ptr._ushort;
|
||||
osg::ushort* iptr = base;
|
||||
unsigned short* base = gset.getCoordIndices()._ptr._ushort;
|
||||
unsigned short* iptr = base;
|
||||
const int numPrim = gset.getNumPrims();
|
||||
for(int i=0; i<numPrim; ++i )
|
||||
{
|
||||
const int primLength = gset.getPrimLengths()[i];
|
||||
osg::ushort* iend = iptr+primLength;
|
||||
unsigned short* iend = iptr+primLength;
|
||||
int tri=0;
|
||||
for(int j = 3; j < primLength; j+=2 )
|
||||
{
|
||||
@@ -385,12 +385,12 @@ void for_each_triangle2(const osg::GeoSet& gset,T& op)
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::uint cindex = 0;
|
||||
unsigned int cindex = 0;
|
||||
const int numPrim = gset.getNumPrims();
|
||||
for(int i=0; i<numPrim; ++i )
|
||||
{
|
||||
const int primLength = gset.getPrimLengths()[i];
|
||||
osg::uint cindex_end = cindex+primLength;
|
||||
unsigned int cindex_end = cindex+primLength;
|
||||
int tri=0;
|
||||
for(int j = 3; j < primLength; j+=2 )
|
||||
{
|
||||
@@ -411,8 +411,8 @@ void for_each_triangle2(const osg::GeoSet& gset,T& op)
|
||||
{
|
||||
if (gset.getCoordIndices()._is_ushort)
|
||||
{
|
||||
osg::ushort* base = gset.getCoordIndices()._ptr._ushort;
|
||||
osg::ushort* iptr = base;
|
||||
unsigned short* base = gset.getCoordIndices()._ptr._ushort;
|
||||
unsigned short* iptr = base;
|
||||
const int numPrim = gset.getNumPrims();
|
||||
for(int i=0; i<numPrim; ++i )
|
||||
{
|
||||
@@ -441,7 +441,7 @@ void for_each_triangle2(const osg::GeoSet& gset,T& op)
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::uint cindex = 0;
|
||||
unsigned int cindex = 0;
|
||||
const int numPrim = gset.getNumPrims();
|
||||
for(int i=0; i<numPrim; ++i )
|
||||
{
|
||||
@@ -463,8 +463,8 @@ void for_each_triangle2(const osg::GeoSet& gset,T& op)
|
||||
{
|
||||
if (gset.getCoordIndices()._is_ushort)
|
||||
{
|
||||
osg::ushort* base = gset.getCoordIndices()._ptr._ushort;
|
||||
osg::ushort* iptr = base;
|
||||
unsigned short* base = gset.getCoordIndices()._ptr._ushort;
|
||||
unsigned short* iptr = base;
|
||||
const int numPrim = gset.getNumPrims();
|
||||
for(int i=0; i<numPrim; ++i )
|
||||
{
|
||||
@@ -472,8 +472,8 @@ void for_each_triangle2(const osg::GeoSet& gset,T& op)
|
||||
int tri=0;
|
||||
if (primLength>0)
|
||||
{
|
||||
osg::ushort *start = iptr;
|
||||
osg::ushort* iend = iptr+primLength;
|
||||
unsigned short *start = iptr;
|
||||
unsigned short* iend = iptr+primLength;
|
||||
++iptr;
|
||||
for(int j = 2; j < primLength; ++j )
|
||||
{
|
||||
@@ -512,7 +512,7 @@ void for_each_triangle2(const osg::GeoSet& gset,T& op)
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::uint cindex = 0;
|
||||
unsigned int cindex = 0;
|
||||
const int numPrim = gset.getNumPrims();
|
||||
for(int i=0; i<numPrim; ++i )
|
||||
{
|
||||
@@ -520,8 +520,8 @@ void for_each_triangle2(const osg::GeoSet& gset,T& op)
|
||||
int tri=0;
|
||||
if (primLength>0)
|
||||
{
|
||||
osg::uint cindex_start = cindex;
|
||||
osg::uint cindex_end = cindex+primLength;
|
||||
unsigned int cindex_start = cindex;
|
||||
unsigned int cindex_end = cindex+primLength;
|
||||
++cindex;
|
||||
for(int j = 2; j < primLength; ++j)
|
||||
{
|
||||
|
||||
@@ -163,8 +163,8 @@ const float ALPHA_OPAQUE = 1.0;
|
||||
|
||||
#define ARRAY_LEN(a) (sizeof(a)/sizeof((a)[0]))
|
||||
|
||||
typedef osg::ubyte Vec4UB[4];
|
||||
typedef osg::ubyte Vec3UB[3];
|
||||
typedef unsigned char Vec4UB[4];
|
||||
typedef unsigned char Vec3UB[3];
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -1129,17 +1129,17 @@ void DXArrayWriter::WritePerVertexColors(
|
||||
try {
|
||||
memset( set, '\0', num_points * sizeof(int) );
|
||||
|
||||
osg::uint num_pt_instances = num_pindices ? num_pindices : num_points;
|
||||
osg::uint num_color_instances = num_cindices ? num_cindices : num_colors;
|
||||
unsigned int num_pt_instances = num_pindices ? num_pindices : num_points;
|
||||
unsigned int num_color_instances = num_cindices ? num_cindices : num_colors;
|
||||
if ( num_pt_instances != num_color_instances ) {
|
||||
msg_bin->Add( "ERROR: Incorrect number of colors found\n" );
|
||||
throw 1;
|
||||
}
|
||||
|
||||
for ( osg::uint i = 0; i < num_pt_instances; i++ )
|
||||
for ( unsigned int i = 0; i < num_pt_instances; i++ )
|
||||
{
|
||||
osg::uint pindex = pindices.valid() ? pindices[i] : i;
|
||||
osg::uint cindex = cindices.valid() ? cindices[i] : i;
|
||||
unsigned int pindex = pindices.valid() ? pindices[i] : i;
|
||||
unsigned int cindex = cindices.valid() ? cindices[i] : i;
|
||||
|
||||
if ( set[pindex] && ( pt_cindices[pindex] != cindex ) )
|
||||
msg_bin->Add( "ERROR: Vertex color aliasing!!! Ask somebody to expand\n"
|
||||
@@ -1463,7 +1463,7 @@ std::string DXWriter::WriteImage( const osg::Image &image )
|
||||
}
|
||||
|
||||
unsigned num_pixels = image.s() * image.t();
|
||||
osg::ubyte opaque = osg::ubyte( ALPHA_OPAQUE * 255.0 );
|
||||
unsigned char opaque = (unsigned char) (ALPHA_OPAQUE * 255.0 );
|
||||
Vec4UB *colors = new Vec4UB[ num_pixels ];
|
||||
unsigned i;
|
||||
|
||||
|
||||
@@ -130,8 +130,8 @@ public:
|
||||
}
|
||||
}
|
||||
void readfile(std::ifstream &fin) {
|
||||
osg::uchar tokid, type;
|
||||
osg::ushort nits;
|
||||
unsigned char tokid, type;
|
||||
unsigned short nits;
|
||||
if (!fin.eof()) {
|
||||
fin.read((char *)&tokid,1);fin.read((char *)&type,1);
|
||||
fin.read((char *)&nits,sizeof(unsigned short));
|
||||
@@ -147,15 +147,15 @@ public:
|
||||
}
|
||||
void writefile(std::ofstream &fout) { // write binary file
|
||||
if (numItems<32767 && tokenId<256) {
|
||||
osg::uchar tokid=tokenId, type=TypeId;
|
||||
unsigned char tokid=tokenId, type=TypeId;
|
||||
fout.write((char *)&tokid, 1);fout.write((char *)&type,1);
|
||||
fout.write((char *)&numItems,sizeof(unsigned short));
|
||||
} else {
|
||||
}
|
||||
fout.write((char *)storage, storeSize*numItems);
|
||||
}
|
||||
inline osg::uchar getToken() const { return tokenId;}
|
||||
inline osg::uchar getType() const { return TypeId;}
|
||||
inline unsigned char getToken() const { return tokenId;}
|
||||
inline unsigned char getType() const { return TypeId;}
|
||||
inline unsigned short getNum() const { return numItems;}
|
||||
inline unsigned char *getstore (unsigned int i) const {
|
||||
return storage+i*storeSize;
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
int *in;
|
||||
uint *uin;
|
||||
short *sh;
|
||||
osg::ushort *ush;
|
||||
unsigned short *ush;
|
||||
long *ln;
|
||||
unsigned long *uln;
|
||||
double *dbl;
|
||||
@@ -359,7 +359,7 @@ public:
|
||||
return output; // to enable cascading, monkey copy from osg\plane or \quat, Ubyte4, vec2,3,4,...
|
||||
}
|
||||
private:
|
||||
osg::ushort tokenId, TypeId; // these are longer than standard field; are extended field length
|
||||
unsigned short tokenId, TypeId; // these are longer than standard field; are extended field length
|
||||
uint numItems;
|
||||
unsigned char *storage; // data relating
|
||||
uint storeSize; // size*numItems in storage
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#endif
|
||||
|
||||
#include "osg/ConvexPlanarOccluder"
|
||||
#include "osg/Types"
|
||||
#include "osg/Notify"
|
||||
|
||||
#include "osgDB/Registry"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#endif
|
||||
|
||||
#include "osg/GeoSet"
|
||||
#include "osg/Types"
|
||||
#include "osg/Notify"
|
||||
|
||||
#include "osgDB/Registry"
|
||||
|
||||
@@ -38,7 +38,7 @@ bool LineStipple_readLocalData(Object& obj, Input& fr)
|
||||
iteratorAdvanced = true;
|
||||
}
|
||||
|
||||
osg::uint mask = linestipple.getPattern();
|
||||
unsigned int mask = linestipple.getPattern();
|
||||
if (fr[0].matchWord("functionMask") && fr[1].getUInt(mask))
|
||||
{
|
||||
linestipple.setPattern(mask);
|
||||
|
||||
@@ -526,7 +526,7 @@ bool StateSet_writeLocalData(const Object& obj, Output& fw)
|
||||
else
|
||||
{
|
||||
// no name defined for GLMode so just pass its value to fw.
|
||||
fw.indent() << "0x" << hex << (osg::uint)mitr->first << dec <<" " << StateSet_getModeStr(mitr->second) << std::endl;
|
||||
fw.indent() << "0x" << hex << (unsigned int)mitr->first << dec <<" " << StateSet_getModeStr(mitr->second) << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,7 +560,7 @@ bool StateSet_writeLocalData(const Object& obj, Output& fw)
|
||||
else
|
||||
{
|
||||
// no name defined for GLMode so just pass its value to fw.
|
||||
fw.indent() << "0x" << hex << (osg::uint)mitr->first << dec <<" " << StateSet_getModeStr(mitr->second) << std::endl;
|
||||
fw.indent() << "0x" << hex << (unsigned int)mitr->first << dec <<" " << StateSet_getModeStr(mitr->second) << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ bool Stencil_readLocalData(Object& obj, Input& fr)
|
||||
iteratorAdvanced = true;
|
||||
}
|
||||
|
||||
osg::uint mask = stencil.getFunctionMask();
|
||||
unsigned int mask = stencil.getFunctionMask();
|
||||
if (fr[0].matchWord("functionMask") && fr[1].getUInt(mask))
|
||||
{
|
||||
setFunction = true;
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
#include <osg/Types>
|
||||
#include <osg/Notify>
|
||||
#include <osg/TriangleFunctor>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user