From David Callu, warning fixes and removal of spaces at end of lines.

This commit is contained in:
Robert Osfield
2013-06-28 12:00:43 +00:00
parent d82768417d
commit 097aedf23c
100 changed files with 496 additions and 428 deletions

View File

@@ -696,9 +696,9 @@ class OSG_EXPORT BufferData : public Object
unsigned int getNumClients() const { return _numClients; }
void addClient(osg::Object *client) { ++_numClients; }
void addClient(osg::Object * /*client*/) { ++_numClients; }
void removeClient(osg::Object *client) { --_numClients; }
void removeClient(osg::Object */*client*/) { --_numClients; }
protected:

View File

@@ -60,6 +60,12 @@
#endif
#endif
#ifndef OSG_UNUSED
#define OSG_UNUSED(var) (void) var
#endif
/**
\namespace osg

View File

@@ -92,22 +92,22 @@ class OSG_EXPORT ImageStream : public Image
virtual void setVolume(float) {}
virtual float getVolume() const { return 0.0f; }
/// set the balance of the audio: -1 = left, 0 = center, 1 = right
virtual float getAudioBalance() { return 0.0f; }
virtual void setAudioBalance(float b) {}
virtual void setAudioBalance(float /*b*/) {}
typedef std::vector< osg::ref_ptr<osg::AudioStream> > AudioStreams;
void setAudioStreams(const AudioStreams& asl) { _audioStreams = asl; }
AudioStreams& getAudioStreams() { return _audioStreams; }
const AudioStreams& getAudioStreams() const { return _audioStreams; }
/** create a suitable texture for this imagestream, return NULL, if not supported
* implement this method in subclasses to use special technologies like CoreVideo
* or similar.
*/
virtual osg::Texture* createSuitableTexture() { return NULL; }
protected:
virtual void applyLoopingMode() {}

View File

@@ -24,7 +24,7 @@
#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B
#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C
#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D
#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E
#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E
#endif
namespace osg {
@@ -87,15 +87,15 @@ class OSG_EXPORT TextureBuffer : public Texture
virtual int getTextureWidth() const { return _textureWidth; }
virtual int getTextureHeight() const { return 1; }
virtual int getTextureDepth() const { return 1; }
inline void setUsageHint( GLenum usageHint ) { _usageHint=usageHint; }
inline GLenum getUsageHint() const { return _usageHint; }
virtual void allocateMipmap(State& state) const {};
virtual void allocateMipmap(State& /*state*/) const {};
/** Bind the texture buffer.*/
virtual void apply(State& state) const;
/** Bind buffer to different target. */
void bindBufferAs(unsigned int contextID, GLenum target);
void unbindBufferAs(unsigned int contextID, GLenum target);
@@ -113,11 +113,11 @@ class OSG_EXPORT TextureBuffer : public Texture
typedef buffered_value<unsigned int> ImageModifiedCount;
mutable ImageModifiedCount _modifiedCount;
class TextureBufferObject : public osg::Referenced
{
public:
TextureBufferObject(unsigned int contextID, GLenum usageHint) :
TextureBufferObject(unsigned int contextID, GLenum usageHint) :
_id(0),
_usageHint(usageHint)
{
@@ -126,7 +126,7 @@ class OSG_EXPORT TextureBuffer : public Texture
void bindBuffer(GLenum target);
void unbindBuffer(GLenum target);
void texBuffer(GLenum internalFormat);
void bufferData( osg::Image* image );
void bufferSubData( osg::Image* image );
@@ -136,8 +136,8 @@ class OSG_EXPORT TextureBuffer : public Texture
GLenum _usageHint;
osg::GLBufferObject::Extensions* _extensions;
};
typedef osg::buffered_object<osg::ref_ptr<TextureBufferObject> > TextureBufferObjectList;
typedef osg::buffered_object<osg::ref_ptr<TextureBufferObject> > TextureBufferObjectList;
mutable TextureBufferObjectList _textureBufferObjects;
};

View File

@@ -44,55 +44,55 @@ class ValueObject : public Object
class GetValueVisitor
{
public:
virtual void apply(bool value) {}
virtual void apply(char value) {}
virtual void apply(unsigned char value) {}
virtual void apply(short value) {}
virtual void apply(unsigned short value) {}
virtual void apply(int value) {}
virtual void apply(unsigned int value) {}
virtual void apply(float value) {}
virtual void apply(double value) {}
virtual void apply(const std::string& value) {}
virtual void apply(const osg::Vec2f& value) {}
virtual void apply(const osg::Vec3f& value) {}
virtual void apply(const osg::Vec4f& value) {}
virtual void apply(const osg::Vec2d& value) {}
virtual void apply(const osg::Vec3d& value) {}
virtual void apply(const osg::Vec4d& value) {}
virtual void apply(const osg::Quat& value) {}
virtual void apply(const osg::Plane& value) {}
virtual void apply(const osg::Matrixf& value) {}
virtual void apply(const osg::Matrixd& value) {}
virtual void apply(bool /*value*/) {}
virtual void apply(char /*value*/) {}
virtual void apply(unsigned char /*value*/) {}
virtual void apply(short /*value*/) {}
virtual void apply(unsigned short /*value*/) {}
virtual void apply(int /*value*/) {}
virtual void apply(unsigned int /*value*/) {}
virtual void apply(float /*value*/) {}
virtual void apply(double /*value*/) {}
virtual void apply(const std::string& /*value*/) {}
virtual void apply(const osg::Vec2f& /*value*/) {}
virtual void apply(const osg::Vec3f& /*value*/) {}
virtual void apply(const osg::Vec4f& /*value*/) {}
virtual void apply(const osg::Vec2d& /*value*/) {}
virtual void apply(const osg::Vec3d& /*value*/) {}
virtual void apply(const osg::Vec4d& /*value*/) {}
virtual void apply(const osg::Quat& /*value*/) {}
virtual void apply(const osg::Plane& /*value*/) {}
virtual void apply(const osg::Matrixf& /*value*/) {}
virtual void apply(const osg::Matrixd& /*value*/) {}
};
class SetValueVisitor
{
public:
virtual void apply(bool& value) {}
virtual void apply(char& value) {}
virtual void apply(unsigned char& value) {}
virtual void apply(short& value) {}
virtual void apply(unsigned short& value) {}
virtual void apply(int& value) {}
virtual void apply(unsigned int& value) {}
virtual void apply(float& value) {}
virtual void apply(double& value) {}
virtual void apply(std::string& value) {}
virtual void apply(osg::Vec2f& value) {}
virtual void apply(osg::Vec3f& value) {}
virtual void apply(osg::Vec4f& value) {}
virtual void apply(osg::Vec2d& value) {}
virtual void apply(osg::Vec3d& value) {}
virtual void apply(osg::Vec4d& value) {}
virtual void apply(osg::Quat& value) {}
virtual void apply(osg::Plane& value) {}
virtual void apply(osg::Matrixf& value) {}
virtual void apply(osg::Matrixd& value) {}
virtual void apply(bool& /*value*/) {}
virtual void apply(char& /*value*/) {}
virtual void apply(unsigned char& /*value*/) {}
virtual void apply(short& /*value*/) {}
virtual void apply(unsigned short& /*value*/) {}
virtual void apply(int& /*value*/) {}
virtual void apply(unsigned int& /*value*/) {}
virtual void apply(float& /*value*/) {}
virtual void apply(double& /*value*/) {}
virtual void apply(std::string& /*value*/) {}
virtual void apply(osg::Vec2f& /*value*/) {}
virtual void apply(osg::Vec3f& /*value*/) {}
virtual void apply(osg::Vec4f& /*value*/) {}
virtual void apply(osg::Vec2d& /*value*/) {}
virtual void apply(osg::Vec3d& /*value*/) {}
virtual void apply(osg::Vec4d& /*value*/) {}
virtual void apply(osg::Quat& /*value*/) {}
virtual void apply(osg::Plane& /*value*/) {}
virtual void apply(osg::Matrixf& /*value*/) {}
virtual void apply(osg::Matrixd& /*value*/) {}
};
virtual bool get(GetValueVisitor& gvv) const { return false; }
virtual bool set(SetValueVisitor& gvv) { return false; }
virtual bool get(GetValueVisitor& /*gvv*/) const { return false; }
virtual bool set(SetValueVisitor& /*gvv*/) { return false; }
protected:
virtual ~ValueObject() {}
};