Commit 69276471 authored by Andreas Neu's avatar Andreas Neu
Browse files

std::string name -> std::string _name as parameter in order to fullfill naming conventions.

Setting the name of a attachment in Framebuffer::attachColorTarget and Framebuffer::attachColorTexture.
parent 01b1bda6
......@@ -44,15 +44,15 @@ public:
inline FrameBufferControl& depthTexture (const SharedTexture& _pDepthTexture) { mDepthAttachment.texture = _pDepthTexture; return *this; }
inline FrameBufferControl& depthRenderBuffer (const SharedRenderBuffer& _pDepthRenderBuffer) { mDepthAttachment.renderBuffer = _pDepthRenderBuffer; return *this; }
inline FrameBufferControl& colorTexture(const std::string& name, const SharedTexture& _texture)
inline FrameBufferControl& colorTexture(const std::string& _name, const SharedTexture& _texture)
{
FrameBuffer::Attachment attachment = {name, _texture, SharedRenderBuffer()};
FrameBuffer::Attachment attachment = {_name, _texture, SharedRenderBuffer()};
mColorAttachments.push_back(attachment);
return *this;
}
inline FrameBufferControl& colorRenderBuffer(const std::string& name, const SharedRenderBuffer& _renderBuffer)
inline FrameBufferControl& colorRenderBuffer(const std::string& _name, const SharedRenderBuffer& _renderBuffer)
{
FrameBuffer::Attachment attachment = {name, SharedTexture(), _renderBuffer};
FrameBuffer::Attachment attachment = {_name, SharedTexture(), _renderBuffer};
mColorAttachments.push_back(attachment);
return *this;
}
......
......@@ -140,7 +140,7 @@ public:
return true;
}
inline bool attachColorRenderBuffer(const SharedRenderBuffer& _renderBuffer)
inline bool attachColorRenderBuffer(const std::string _name, const SharedRenderBuffer& _renderBuffer)
{
if(_renderBuffer->getWidth() != mWidth && _renderBuffer->getHeight() != mHeight)
{
......@@ -153,12 +153,12 @@ public:
return false;
}
mDrawBuffers++;
Attachment attachment = {"", SharedTexture(), _renderBuffer};
Attachment attachment = {_name, SharedTexture(), _renderBuffer};
mColorAttachments.push_back(attachment);
return true;
}
inline bool attachColorTexture(const SharedTexture& _texture)
inline bool attachColorTexture(const std::string _name, const SharedTexture& _texture)
{
if(_texture->getWidth() != mWidth && _texture->getHeight() != mHeight)
{
......@@ -171,7 +171,7 @@ public:
return false;
}
mDrawBuffers++;
Attachment attachment = {"", _texture, SharedRenderBuffer()};
Attachment attachment = {_name, _texture, SharedRenderBuffer()};
mColorAttachments.push_back(attachment);
return true;
}
......
......@@ -15,9 +15,9 @@ SharedFrameBuffer FrameBufferControl::create(void)
for(FrameBuffer::AttachmentVec::size_type i = 0; i < mColorAttachments.size(); ++i)
{
if(mColorAttachments[i].texture)
frameBuffer->attachColorTexture(mColorAttachments[i].texture);
frameBuffer->attachColorTexture(mColorAttachments[i].name, mColorAttachments[i].texture);
else if(mColorAttachments[i].renderBuffer)
frameBuffer->attachColorRenderBuffer(mColorAttachments[i].renderBuffer);
frameBuffer->attachColorRenderBuffer(mColorAttachments[i].name, mColorAttachments[i].renderBuffer);
}
if(mDepthAttachment.texture)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment