Fix pointlight call

This commit is contained in:
Vincent Lejeune 2014-08-22 00:38:45 +02:00
parent 547018f0ab
commit 5c879b623f
2 changed files with 2 additions and 3 deletions

View File

@ -50,8 +50,7 @@ static void renderPointLights(unsigned count)
glBindBuffer(GL_ARRAY_BUFFER, LightShader::PointLightShader::getInstance()->vbo);
glBufferSubData(GL_ARRAY_BUFFER, 0, count * sizeof(LightShader::PointLightInfo), PointLightsInfo);
setTexture(0, irr_driver->getRenderTargetTexture(RTT_NORMAL_AND_DEPTH), GL_NEAREST, GL_NEAREST);
setTexture(1, irr_driver->getDepthStencilTexture(), GL_NEAREST, GL_NEAREST);
LightShader::PointLightShader::getInstance()->SetTextureUnits(createVector<GLuint>(irr_driver->getRenderTargetTexture(RTT_NORMAL_AND_DEPTH), irr_driver->getDepthStencilTexture()));
LightShader::PointLightShader::getInstance()->setUniforms();
glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, count);

View File

@ -691,7 +691,7 @@ namespace LightShader
};
class PointLightShader : public ShaderHelperSingleton<PointLightShader>, TextureRead<Nearest_Filtered, Nearest_Filtered>
class PointLightShader : public ShaderHelperSingleton<PointLightShader>, public TextureRead<Nearest_Filtered, Nearest_Filtered>
{
public:
GLuint vbo;