Resize should now be working correctly.

This commit is contained in:
Tleety
2016-02-19 11:42:52 +01:00
parent e15a7b9485
commit 8c9f4bb84b
7 changed files with 56 additions and 4 deletions
+9
View File
@@ -121,6 +121,15 @@ void DrawBloomPass::Draw(GLuint texture)
GLERROR("DrawBloomPass::Draw: END");
}
void DrawBloomPass::OnWindowRezise()
{
GenerateTexture(&m_GaussianTexture_vert, GL_CLAMP_TO_EDGE, GL_LINEAR, glm::vec2(m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height), GL_RGB16F, GL_RGB, GL_FLOAT);
m_GaussianFrameBuffer_vert.Generate();
GenerateTexture(&m_GaussianTexture_horiz, GL_CLAMP_TO_EDGE, GL_LINEAR, glm::vec2(m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height), GL_RGB16F, GL_RGB, GL_FLOAT);
m_GaussianFrameBuffer_horiz.Generate();
}
void DrawBloomPass::GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type) const
{
glGenTextures(1, texture);