From Art Trevs, Removed GLeunm version setAttachment() to avoid ambigiuity with

whether to enable MRT.
This commit is contained in:
Robert Osfield
2008-07-15 14:24:21 +00:00
parent c88d34ee97
commit 35bc9c7dd2
2 changed files with 2 additions and 34 deletions

View File

@@ -371,18 +371,10 @@ namespace osg
inline const AttachmentMap& getAttachmentMap() const;
void setAttachment(GLenum attachment_point, const FrameBufferAttachment &attachment);
inline const FrameBufferAttachment& getAttachment(GLenum attachment_point) const;
inline bool hasAttachment(GLenum attachment_point) const;
void setAttachment(BufferComponent attachment_point, const FrameBufferAttachment &attachment);
inline const FrameBufferAttachment& getAttachment(BufferComponent attachment_point) const;
inline bool hasAttachment(BufferComponent attachment_point) const;
GLenum convertBufferComponentToGLenum(BufferComponent attachment_point) const;
BufferComponent convertGLenumToBufferComponent(GLenum attachment_point) const;
inline bool hasMultipleRenderingTargets() const { return !_drawBuffers.empty(); }
inline const MultipleRenderingTargets& getMultipleRenderingTargets() const { return _drawBuffers; }
@@ -423,6 +415,8 @@ namespace osg
inline void dirtyAll();
GLenum convertBufferComponentToGLenum(BufferComponent attachment_point) const;
private:
AttachmentMap _attachments;
@@ -442,21 +436,11 @@ namespace osg
return _attachments;
}
inline bool FrameBufferObject::hasAttachment(GLenum attachment_point) const
{
return hasAttachment(convertGLenumToBufferComponent(attachment_point));
}
inline bool FrameBufferObject::hasAttachment(FrameBufferObject::BufferComponent attachment_point) const
{
return _attachments.find(attachment_point) != _attachments.end();
}
inline const FrameBufferAttachment &FrameBufferObject::getAttachment(GLenum attachment_point) const
{
return getAttachment(convertGLenumToBufferComponent(attachment_point));
}
inline const FrameBufferAttachment &FrameBufferObject::getAttachment(FrameBufferObject::BufferComponent attachment_point) const
{
return _attachments.find(attachment_point)->second;