added editor WIP
This commit is contained in:
@@ -14,12 +14,16 @@ TSE::GLFW::FrameBuffer::FrameBuffer(const Vector2 &size)
|
||||
|
||||
void TSE::GLFW::FrameBuffer::Bind()
|
||||
{
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, depthRboID);
|
||||
glBindTexture(GL_TEXTURE_2D, textureID);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, bufferID);
|
||||
}
|
||||
|
||||
void TSE::GLFW::FrameBuffer::Unbind()
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, 0);
|
||||
}
|
||||
|
||||
TSE::GLFW::FrameBuffer::~FrameBuffer()
|
||||
@@ -69,6 +73,8 @@ void TSE::GLFW::FrameBuffer::Initialize()
|
||||
TSE_LOG(std::to_string(glGetError()));
|
||||
}
|
||||
Unbind();
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, 0);
|
||||
}
|
||||
|
||||
void TSE::GLFW::FrameBuffer::LoadFBTexture()
|
||||
|
||||
Reference in New Issue
Block a user