Removed last of the uint references.
This commit is contained in:
parent
319e84ceed
commit
bd506b53da
@ -261,11 +261,11 @@ class SG_EXPORT Drawable : public Object
|
||||
* OpenGL display list to cached until they can be deleted
|
||||
* by the OpenGL context in which they were created, specified
|
||||
* by contextID.*/
|
||||
static void deleteDisplayList(uint contextID,uint globj);
|
||||
static void deleteDisplayList(unsigned int contextID,GLuint globj);
|
||||
|
||||
/** flush all the cached display list which need to be deleted
|
||||
* in the OpenGL context related to contextID.*/
|
||||
static void flushDeletedDisplayLists(uint contextID);
|
||||
static void flushDeletedDisplayLists(unsigned int contextID);
|
||||
|
||||
|
||||
enum AttributeType
|
||||
@ -401,7 +401,7 @@ class SG_EXPORT Drawable : public Object
|
||||
bool _supportsDisplayList;
|
||||
bool _useDisplayList;
|
||||
|
||||
typedef osg::buffered_value<uint> GLObjectList;
|
||||
typedef osg::buffered_value<GLuint> GLObjectList;
|
||||
mutable GLObjectList _globjList;
|
||||
|
||||
ref_ptr<UpdateCallback> _updateCallback;
|
||||
@ -418,10 +418,10 @@ inline void Drawable::draw(State& state) const
|
||||
|
||||
// get the contextID (user defined ID of 0 upwards) for the
|
||||
// current OpenGL context.
|
||||
uint contextID = state.getContextID();
|
||||
unsigned int contextID = state.getContextID();
|
||||
|
||||
// get the globj for the current contextID.
|
||||
uint& globj = _globjList[contextID];
|
||||
GLuint& globj = _globjList[contextID];
|
||||
|
||||
// call the globj if already set otherwise compile and execute.
|
||||
if( globj != 0 )
|
||||
|
@ -90,7 +90,7 @@ class SG_EXPORT GeoSet : public Drawable
|
||||
struct SG_EXPORT IndexPointer
|
||||
{
|
||||
|
||||
mutable uint _size;
|
||||
mutable unsigned int _size;
|
||||
bool _is_ushort;
|
||||
union _TPtr
|
||||
{
|
||||
@ -124,7 +124,7 @@ class SG_EXPORT GeoSet : public Drawable
|
||||
_ptr._ushort = (GLushort*)0;
|
||||
}
|
||||
|
||||
inline void set(uint size,GLushort* data)
|
||||
inline void set(unsigned int size,GLushort* data)
|
||||
{
|
||||
_size = size;
|
||||
_is_ushort = true;
|
||||
@ -132,24 +132,24 @@ class SG_EXPORT GeoSet : public Drawable
|
||||
}
|
||||
|
||||
|
||||
void set(uint size,GLuint* data)
|
||||
void set(unsigned int size,GLuint* data)
|
||||
{
|
||||
_size = size;
|
||||
_is_ushort = false;
|
||||
_ptr._uint = data;
|
||||
}
|
||||
|
||||
inline uint maxIndex() const
|
||||
inline unsigned int maxIndex() const
|
||||
{
|
||||
uint max = 0;
|
||||
unsigned int max = 0;
|
||||
if (_is_ushort)
|
||||
{
|
||||
for(uint ai = 0; ai < _size; ai++ )
|
||||
for(unsigned int ai = 0; ai < _size; ai++ )
|
||||
if( _ptr._ushort[ai] > max ) max = _ptr._ushort[ai];
|
||||
}
|
||||
else
|
||||
{
|
||||
for(uint ai = 0; ai < _size; ai++ )
|
||||
for(unsigned int ai = 0; ai < _size; ai++ )
|
||||
if( _ptr._uint[ai] > max ) max = _ptr._uint[ai];
|
||||
}
|
||||
return max;
|
||||
@ -210,9 +210,9 @@ class SG_EXPORT GeoSet : public Drawable
|
||||
To reduce memory footprint and bandwidth for small datasets it is
|
||||
recommended the ushort indices are used instead of unit indices.*/
|
||||
void setCoords( Vec3 *cp, GLushort *ci );
|
||||
/** set the coords (i.e the geometry) and uint indices of the geoset.
|
||||
/** set the coords (i.e the geometry) and unsigned int indices of the geoset.
|
||||
Unless your data set exceeds 65536 indices prefer ushort indices
|
||||
over uint indices, only use this unit indices version if necessary.*/
|
||||
over unsigned int indices, only use this unit indices version if necessary.*/
|
||||
void setCoords( Vec3 *cp, GLuint *ci );
|
||||
/** set the coords (i.e the geometry) and indices of the geoset.*/
|
||||
void setCoords( Vec3 *cp, IndexPointer& ip );
|
||||
|
@ -77,7 +77,7 @@ class SG_EXPORT Stencil : public StateAttribute
|
||||
ALWAYS = GL_ALWAYS
|
||||
};
|
||||
|
||||
inline void setFunction(Function func,int ref,uint mask)
|
||||
inline void setFunction(Function func,int ref,unsigned int mask)
|
||||
{
|
||||
_func = func;
|
||||
_funcRef = ref;
|
||||
@ -88,7 +88,7 @@ class SG_EXPORT Stencil : public StateAttribute
|
||||
|
||||
inline int getFunctionRef() const { return _funcRef; }
|
||||
|
||||
inline uint getFunctionMask() const { return _funcMask; }
|
||||
inline unsigned int getFunctionMask() const { return _funcMask; }
|
||||
|
||||
|
||||
enum Operation
|
||||
@ -125,9 +125,9 @@ class SG_EXPORT Stencil : public StateAttribute
|
||||
inline Operation getStencilPassAndDepthPassOperation() const { return _zpass; }
|
||||
|
||||
|
||||
inline void setWriteMask(uint mask) { _writeMask = mask; }
|
||||
inline void setWriteMask(unsigned int mask) { _writeMask = mask; }
|
||||
|
||||
inline uint getWriteMask() const { return _writeMask; }
|
||||
inline unsigned int getWriteMask() const { return _writeMask; }
|
||||
|
||||
|
||||
virtual void apply(State& state) const;
|
||||
@ -138,13 +138,13 @@ class SG_EXPORT Stencil : public StateAttribute
|
||||
|
||||
Function _func;
|
||||
int _funcRef;
|
||||
uint _funcMask;
|
||||
unsigned int _funcMask;
|
||||
|
||||
Operation _sfail;
|
||||
Operation _zfail;
|
||||
Operation _zpass;
|
||||
|
||||
uint _writeMask;
|
||||
unsigned int _writeMask;
|
||||
|
||||
};
|
||||
|
||||
|
@ -146,12 +146,12 @@ class SG_EXPORT Texture3D : public Texture
|
||||
* If 'createIfNotInitalized' is true then the Extensions object is
|
||||
* automatically created. However, in this case the extension object
|
||||
* only be created with the graphics context associated with ContextID..*/
|
||||
static const Extensions* getExtensions(uint contextID,bool createIfNotInitalized);
|
||||
static const Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized);
|
||||
|
||||
/** setExtensions allows users to override the extensions across graphics contexts.
|
||||
* typically used when you have different extensions supported across graphics pipes
|
||||
* but need to ensure that they all use the same low common denominator extensions.*/
|
||||
static void setExtensions(uint contextID,Extensions* extensions);
|
||||
static void setExtensions(unsigned int contextID,Extensions* extensions);
|
||||
|
||||
protected :
|
||||
|
||||
|
@ -134,12 +134,12 @@ class SG_EXPORT TextureCubeMap : public Texture
|
||||
* If 'createIfNotInitalized' is true then the Extensions object is
|
||||
* automatically created. However, in this case the extension object
|
||||
* only be created with the graphics context associated with ContextID..*/
|
||||
static const Extensions* getExtensions(uint contextID,bool createIfNotInitalized);
|
||||
static const Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized);
|
||||
|
||||
/** setExtensions allows users to override the extensions across graphics contexts.
|
||||
* typically used when you have different extensions supported across graphics pipes
|
||||
* but need to ensure that they all use the same low common denominator extensions.*/
|
||||
static void setExtensions(uint contextID,Extensions* extensions);
|
||||
static void setExtensions(unsigned int contextID,Extensions* extensions);
|
||||
|
||||
|
||||
protected :
|
||||
|
@ -32,7 +32,7 @@ typedef std::vector<GLuint> DisplayListVector;
|
||||
typedef std::map<GLuint,DisplayListVector> DeletedDisplayListCache;
|
||||
static DeletedDisplayListCache s_deletedDisplayListCache;
|
||||
|
||||
void Drawable::deleteDisplayList(uint contextID,uint globj)
|
||||
void Drawable::deleteDisplayList(unsigned int contextID,GLuint globj)
|
||||
{
|
||||
if (globj!=0)
|
||||
{
|
||||
@ -43,7 +43,7 @@ void Drawable::deleteDisplayList(uint contextID,uint globj)
|
||||
|
||||
/** flush all the cached display list which need to be deleted
|
||||
* in the OpenGL context related to contextID.*/
|
||||
void Drawable::flushDeletedDisplayLists(uint contextID)
|
||||
void Drawable::flushDeletedDisplayLists(unsigned int contextID)
|
||||
{
|
||||
DeletedDisplayListCache::iterator citr = s_deletedDisplayListCache.find(contextID);
|
||||
if (citr!=s_deletedDisplayListCache.end())
|
||||
@ -136,7 +136,7 @@ void Drawable::compile(State& state) const
|
||||
|
||||
// get the contextID (user defined ID of 0 upwards) for the
|
||||
// current OpenGL context.
|
||||
uint contextID = state.getContextID();
|
||||
unsigned int contextID = state.getContextID();
|
||||
|
||||
// get the globj for the current contextID.
|
||||
uint& globj = _globjList[contextID];
|
||||
@ -221,7 +221,7 @@ void Drawable::setUseDisplayList(bool flag)
|
||||
|
||||
void Drawable::dirtyDisplayList()
|
||||
{
|
||||
for(uint i=0;i<_globjList.size();++i)
|
||||
for(unsigned int i=0;i<_globjList.size();++i)
|
||||
{
|
||||
if (_globjList[i] != 0)
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ typedef std::map<unsigned int,TextureObjectVector> DeletedTextureObjectCache;
|
||||
static DeletedTextureObjectCache s_deletedTextureObjectCache;
|
||||
|
||||
|
||||
void Texture::deleteTextureObject(uint contextID,GLuint handle)
|
||||
void Texture::deleteTextureObject(unsigned int contextID,GLuint handle)
|
||||
{
|
||||
if (handle!=0)
|
||||
{
|
||||
@ -41,7 +41,7 @@ void Texture::deleteTextureObject(uint contextID,GLuint handle)
|
||||
}
|
||||
|
||||
|
||||
void Texture::flushDeletedTextureObjects(uint contextID)
|
||||
void Texture::flushDeletedTextureObjects(unsigned int contextID)
|
||||
{
|
||||
DeletedTextureObjectCache::iterator citr = s_deletedTextureObjectCache.find(contextID);
|
||||
if (citr!=s_deletedTextureObjectCache.end())
|
||||
@ -167,7 +167,7 @@ void Texture::setMaxAnisotropy(float anis)
|
||||
/** Force a recompile on next apply() of associated OpenGL texture objects.*/
|
||||
void Texture::dirtyTextureObject()
|
||||
{
|
||||
for(uint i=0;i<_handleList.size();++i)
|
||||
for(unsigned int i=0;i<_handleList.size();++i)
|
||||
{
|
||||
if (_handleList[i] != 0)
|
||||
{
|
||||
@ -179,7 +179,7 @@ void Texture::dirtyTextureObject()
|
||||
|
||||
void Texture::dirtyTextureParameters()
|
||||
{
|
||||
for(uint i=0;i<_texParametersDirtyList.size();++i)
|
||||
for(unsigned int i=0;i<_texParametersDirtyList.size();++i)
|
||||
{
|
||||
_texParametersDirtyList[i] = 1;
|
||||
}
|
||||
@ -187,7 +187,7 @@ void Texture::dirtyTextureParameters()
|
||||
|
||||
void Texture::computeInternalFormatWithImage(osg::Image& image) const
|
||||
{
|
||||
const uint contextID = 0; // state.getContextID(); // set to 0 right now, assume same paramters for each graphics context...
|
||||
const unsigned int contextID = 0; // state.getContextID(); // set to 0 right now, assume same paramters for each graphics context...
|
||||
const Extensions* extensions = getExtensions(contextID,true);
|
||||
|
||||
// static bool s_ARB_Compression = isGLExtensionSupported("GL_ARB_texture_compression");
|
||||
@ -303,7 +303,7 @@ void Texture::applyTexParameters(GLenum target, State& state) const
|
||||
{
|
||||
// get the contextID (user defined ID of 0 upwards) for the
|
||||
// current OpenGL context.
|
||||
const uint contextID = state.getContextID();
|
||||
const unsigned int contextID = state.getContextID();
|
||||
const Extensions* extensions = getExtensions(contextID,true);
|
||||
|
||||
WrapMode ws = _wrap_s, wt = _wrap_t, wr = _wrap_r;
|
||||
@ -371,7 +371,7 @@ void Texture::applyTexImage2D(GLenum target, Image* image, State& state, GLsizei
|
||||
|
||||
// get the contextID (user defined ID of 0 upwards) for the
|
||||
// current OpenGL context.
|
||||
const uint contextID = state.getContextID();
|
||||
const unsigned int contextID = state.getContextID();
|
||||
const Extensions* extensions = getExtensions(contextID,true);
|
||||
|
||||
// update the modified tag to show that it is upto date.
|
||||
@ -498,13 +498,13 @@ void Texture::compile(State& state) const
|
||||
typedef buffered_value< ref_ptr<Texture::Extensions> > BufferedExtensions;
|
||||
static BufferedExtensions s_extensions;
|
||||
|
||||
const Texture::Extensions* Texture::getExtensions(uint contextID,bool createIfNotInitalized)
|
||||
const Texture::Extensions* Texture::getExtensions(unsigned int contextID,bool createIfNotInitalized)
|
||||
{
|
||||
if (!s_extensions[contextID] && createIfNotInitalized) s_extensions[contextID] = new Extensions;
|
||||
return s_extensions[contextID].get();
|
||||
}
|
||||
|
||||
void Texture::setExtensions(uint contextID,Extensions* extensions)
|
||||
void Texture::setExtensions(unsigned int contextID,Extensions* extensions)
|
||||
{
|
||||
s_extensions[contextID] = extensions;
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ void Texture3D::apply(State& state) const
|
||||
|
||||
// get the contextID (user defined ID of 0 upwards) for the
|
||||
// current OpenGL context.
|
||||
const uint contextID = state.getContextID();
|
||||
const unsigned int contextID = state.getContextID();
|
||||
|
||||
const Extensions* extensions = getExtensions(contextID,true);
|
||||
|
||||
@ -179,7 +179,7 @@ void Texture3D::applyTexImage3D(GLenum target, Image* image, State& state, GLsiz
|
||||
|
||||
// get the contextID (user defined ID of 0 upwards) for the
|
||||
// current OpenGL context.
|
||||
const uint contextID = state.getContextID();
|
||||
const unsigned int contextID = state.getContextID();
|
||||
|
||||
const Extensions* extensions = getExtensions(contextID,true);
|
||||
|
||||
@ -265,7 +265,7 @@ void Texture3D::applyTexImage3D(GLenum target, Image* image, State& state, GLsiz
|
||||
|
||||
void Texture3D::copyTexSubImage3D(State& state, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height )
|
||||
{
|
||||
const uint contextID = state.getContextID();
|
||||
const unsigned int contextID = state.getContextID();
|
||||
|
||||
// get the globj for the current contextID.
|
||||
GLuint& handle = getTextureObject(contextID);
|
||||
@ -295,13 +295,13 @@ void Texture3D::copyTexSubImage3D(State& state, int xoffset, int yoffset, int zo
|
||||
typedef buffered_value< ref_ptr<Texture3D::Extensions> > BufferedExtensions;
|
||||
static BufferedExtensions s_extensions;
|
||||
|
||||
const Texture3D::Extensions* Texture3D::getExtensions(uint contextID,bool createIfNotInitalized)
|
||||
const Texture3D::Extensions* Texture3D::getExtensions(unsigned int contextID,bool createIfNotInitalized)
|
||||
{
|
||||
if (!s_extensions[contextID] && createIfNotInitalized) s_extensions[contextID] = new Extensions;
|
||||
return s_extensions[contextID].get();
|
||||
}
|
||||
|
||||
void Texture3D::setExtensions(uint contextID,Extensions* extensions)
|
||||
void Texture3D::setExtensions(unsigned int contextID,Extensions* extensions)
|
||||
{
|
||||
s_extensions[contextID] = extensions;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user