mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Fix] (MG_State/FramebufferState): Fix missing functions.
This commit is contained in:
@@ -11,6 +11,7 @@ namespace MobileGL {
|
|||||||
: m_renderbuffer(renderbuffer) {}
|
: m_renderbuffer(renderbuffer) {}
|
||||||
FramebufferAttachment::FramebufferAttachment(std::nullptr_t)
|
FramebufferAttachment::FramebufferAttachment(std::nullptr_t)
|
||||||
: m_texture(nullptr), m_renderbuffer(nullptr) {}
|
: m_texture(nullptr), m_renderbuffer(nullptr) {}
|
||||||
|
FramebufferAttachment::FramebufferAttachment() : m_texture(nullptr), m_renderbuffer(nullptr) {}
|
||||||
|
|
||||||
Bool FramebufferAttachment::IsTexture() const {
|
Bool FramebufferAttachment::IsTexture() const {
|
||||||
return m_texture != nullptr;
|
return m_texture != nullptr;
|
||||||
@@ -55,6 +56,10 @@ namespace MobileGL {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FramebufferObject
|
// FramebufferObject
|
||||||
|
FramebufferObject::FramebufferObject() {
|
||||||
|
m_attachments.fill(FramebufferAttachment(nullptr));
|
||||||
|
}
|
||||||
|
|
||||||
void FramebufferObject::AttachTexture(FramebufferAttachmentType type, SharedPtr<ITextureObject> texture,
|
void FramebufferObject::AttachTexture(FramebufferAttachmentType type, SharedPtr<ITextureObject> texture,
|
||||||
int level) {
|
int level) {
|
||||||
m_attachments[static_cast<SizeT>(type)] = FramebufferAttachment(std::move(texture), level);
|
m_attachments[static_cast<SizeT>(type)] = FramebufferAttachment(std::move(texture), level);
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ namespace MobileGL {
|
|||||||
explicit FramebufferAttachment(SharedPtr<MG_State::GLState::ITextureObject> texture, Int level = 0);
|
explicit FramebufferAttachment(SharedPtr<MG_State::GLState::ITextureObject> texture, Int level = 0);
|
||||||
explicit FramebufferAttachment(SharedPtr<RenderbufferObjectStub> renderbuffer);
|
explicit FramebufferAttachment(SharedPtr<RenderbufferObjectStub> renderbuffer);
|
||||||
explicit FramebufferAttachment(std::nullptr_t);
|
explicit FramebufferAttachment(std::nullptr_t);
|
||||||
|
explicit FramebufferAttachment();
|
||||||
|
|
||||||
Bool IsTexture() const;
|
Bool IsTexture() const;
|
||||||
Bool IsRenderbuffer() const;
|
Bool IsRenderbuffer() const;
|
||||||
@@ -72,8 +73,8 @@ namespace MobileGL {
|
|||||||
IntVec3 GetSize() const;
|
IntVec3 GetSize() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SharedPtr<MG_State::GLState::ITextureObject> m_texture;
|
SharedPtr<MG_State::GLState::ITextureObject> m_texture = nullptr;
|
||||||
SharedPtr<RenderbufferObjectStub> m_renderbuffer;
|
SharedPtr<RenderbufferObjectStub> m_renderbuffer = nullptr;
|
||||||
Int m_textureLevel = 0;
|
Int m_textureLevel = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user