osx fixes

This commit is contained in:
Marianne Gagnon 2014-08-19 19:44:27 -04:00
parent d0e22164d5
commit 5788073b17
3 changed files with 13 additions and 4 deletions

View File

@ -264,8 +264,8 @@ void PostProcessing::renderGI(const core::matrix4 &RHMatrix, const core::vector3
core::matrix4 InvRHMatrix;
RHMatrix.getInverse(InvRHMatrix);
glDisable(GL_DEPTH_TEST);
FullScreenShader::GlobalIlluminationReconstructionShader::getInstance()->SetTextureUnits(std::vector<GLuint>
{ irr_driver->getRenderTargetTexture(RTT_NORMAL_AND_DEPTH), irr_driver->getDepthStencilTexture(), shr, shg, shb });
FullScreenShader::GlobalIlluminationReconstructionShader::getInstance()->SetTextureUnits(createVector<GLuint>(
irr_driver->getRenderTargetTexture(RTT_NORMAL_AND_DEPTH), irr_driver->getDepthStencilTexture(), shr, shg, shb));
DrawFullScreenEffect<FullScreenShader::GlobalIlluminationReconstructionShader>(RHMatrix, InvRHMatrix, rh_extend);
}

View File

@ -608,7 +608,10 @@ void IrrDriver::renderTransparent()
size_t count = mesh.IndexCount;
// Render the effect
MeshShader::DisplaceShader::getInstance()->SetTextureUnits(
{ getTextureGLuint(displaceTex), irr_driver->getRenderTargetTexture(RTT_COLOR), irr_driver->getRenderTargetTexture(RTT_TMP1), getTextureGLuint(mesh.textures[0]) });
createVector<GLuint>(getTextureGLuint(displaceTex),
irr_driver->getRenderTargetTexture(RTT_COLOR),
irr_driver->getRenderTargetTexture(RTT_TMP1),
getTextureGLuint(mesh.textures[0])));
glUseProgram(MeshShader::DisplaceShader::getInstance()->Program);
MeshShader::DisplaceShader::getInstance()->setUniforms(AbsoluteTransformation,
core::vector2df(cb->getDirX(), cb->getDirY()),

View File

@ -155,7 +155,13 @@ void IrrDriver::renderLights(unsigned pointlightcount)
else
{
glUseProgram(FullScreenShader::RadianceHintsConstructionShader::getInstance()->Program);
FullScreenShader::RadianceHintsConstructionShader::getInstance()->SetTextureUnits(std::vector<GLuint>{ m_rtts->getRSM().getRTT()[0], m_rtts->getRSM().getRTT()[1], m_rtts->getRSM().getDepthTexture() });
FullScreenShader::RadianceHintsConstructionShader::getInstance()->SetTextureUnits(
createVector<GLuint>(
m_rtts->getRSM().getRTT()[0],
m_rtts->getRSM().getRTT()[1],
m_rtts->getRSM().getDepthTexture()
)
);
FullScreenShader::RadianceHintsConstructionShader::getInstance()->setUniforms(rsm_matrix, rh_matrix, rh_extend);
glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, 32);
}