From Lionel Lagarde, "Here is a correction on the PixelBufferObject getter methods of Image.

The set method modify the buffer object of the BufferData while the get method returned the buffer object of the Image.

I've also removed the _bufferObject member of Image (not used anymore)."
--This line, Lionel Lagardeand those below, will be ignored--

M    include/osg/Image
This commit is contained in:
Robert Osfield
2012-12-13 17:35:27 +00:00
parent c4b83d2b0c
commit 32c0bc3b39

View File

@@ -413,10 +413,10 @@ class OSG_EXPORT Image : public BufferData
void setPixelBufferObject(PixelBufferObject* buffer) { setBufferObject(buffer); }
/** Get the PixelBufferObject.*/
PixelBufferObject* getPixelBufferObject() { return dynamic_cast<PixelBufferObject*>(_bufferObject.get()); }
PixelBufferObject* getPixelBufferObject() { return dynamic_cast<PixelBufferObject*>(getBufferObject()); }
/** Get the const PixelBufferObject.*/
const PixelBufferObject* getPixelBufferObject() const { return dynamic_cast<const PixelBufferObject*>(_bufferObject.get()); }
const PixelBufferObject* getPixelBufferObject() const { return dynamic_cast<const PixelBufferObject*>(getBufferObject()); }
/** Return whether the update(NodeVisitor* nv) should be required on each frame to enable proper working of osg::Image.*/
virtual bool requiresUpdateCall() const { return false; }
@@ -491,8 +491,6 @@ class OSG_EXPORT Image : public BufferData
void setData(unsigned char* data,AllocationMode allocationMode);
MipmapDataType _mipmapData;
ref_ptr<PixelBufferObject> _bufferObject;
DimensionsChangedCallbackVector _dimensionsChangedCallbacks;
};