mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Fix] (MG_State/FramebufferState): FramebufferAttachment::IsEmpty should be const.
This commit is contained in:
@@ -21,7 +21,7 @@ namespace MobileGL {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool FramebufferAttachment::IsEmpty() {
|
Bool FramebufferAttachment::IsEmpty() const {
|
||||||
return m_texture == nullptr && m_renderbuffer == nullptr;
|
return m_texture == nullptr && m_renderbuffer == nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,8 +63,7 @@ namespace MobileGL {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FramebufferObject
|
// FramebufferObject
|
||||||
FramebufferObject::FramebufferObject(Uint externalIndex) :
|
FramebufferObject::FramebufferObject(Uint externalIndex) : m_externalIndex(externalIndex) {
|
||||||
m_externalIndex(externalIndex) {
|
|
||||||
m_attachments.fill(FramebufferAttachment(false));
|
m_attachments.fill(FramebufferAttachment(false));
|
||||||
m_drawBuffers.fill(FramebufferAttachmentType::None);
|
m_drawBuffers.fill(FramebufferAttachmentType::None);
|
||||||
m_drawBuffers[0] = FramebufferAttachmentType::Color0;
|
m_drawBuffers[0] = FramebufferAttachmentType::Color0;
|
||||||
@@ -130,21 +129,21 @@ namespace MobileGL {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FramebufferObject::SetDrawBuffer(Uint index, FramebufferAttachmentType buffer) {
|
void FramebufferObject::SetDrawBuffer(Uint index, FramebufferAttachmentType buffer) {
|
||||||
if (m_drawBuffers[index] == buffer)
|
if (m_drawBuffers[index] == buffer) return;
|
||||||
return;
|
|
||||||
m_drawBuffersDirty = true;
|
m_drawBuffersDirty = true;
|
||||||
m_drawBuffers[index] = buffer;
|
m_drawBuffers[index] = buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
// void FramebufferObject::SetDrawBuffers(const Vector<FramebufferAttachmentType>& buffers) {
|
// void FramebufferObject::SetDrawBuffers(const Vector<FramebufferAttachmentType>& buffers) {
|
||||||
// m_drawBuffers = buffers;
|
// m_drawBuffers = buffers;
|
||||||
// m_drawBuffersDirty = true;
|
// m_drawBuffersDirty = true;
|
||||||
// }
|
// }
|
||||||
// void SetDrawBuffer(Uint index, FramebufferAttachmentType buffer) {
|
// void SetDrawBuffer(Uint index, FramebufferAttachmentType buffer) {
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|
||||||
const Array<FramebufferAttachmentType, FramebufferObject::MAX_DRAW_BUFFERS>& FramebufferObject::GetDrawBuffers() const {
|
const Array<FramebufferAttachmentType, FramebufferObject::MAX_DRAW_BUFFERS>& FramebufferObject::
|
||||||
|
GetDrawBuffers() const {
|
||||||
return m_drawBuffers;
|
return m_drawBuffers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ namespace MobileGL {
|
|||||||
|
|
||||||
Bool IsTexture() const;
|
Bool IsTexture() const;
|
||||||
Bool IsRenderbuffer() const;
|
Bool IsRenderbuffer() const;
|
||||||
Bool IsEmpty();
|
Bool IsEmpty() const;
|
||||||
SharedPtr<MG_State::GLState::ITextureObject> GetTexture() const;
|
SharedPtr<MG_State::GLState::ITextureObject> GetTexture() const;
|
||||||
SharedPtr<RenderbufferObjectStub> GetRenderbuffer() const;
|
SharedPtr<RenderbufferObjectStub> GetRenderbuffer() const;
|
||||||
Int GetTextureLevel() const;
|
Int GetTextureLevel() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user