Add some ifdef for OSX

This commit is contained in:
vlj
2014-08-20 01:31:11 +02:00
parent 190aed6219
commit d0e22164d5
2 changed files with 14 additions and 3 deletions

View File

@@ -380,11 +380,20 @@ void IrrDriver::renderSolidSecondPass()
glEnable(GL_DEPTH_TEST);
glDisable(GL_ALPHA_TEST);
glDisable(GL_BLEND);
glBindSampler(0, 0);
#ifdef WIN32
if (irr_driver->getGLSLVersion() >= 330)
glBindSampler(0, 0);
#endif
setTexture(0, m_rtts->getRenderTarget(RTT_TMP1), GL_NEAREST, GL_NEAREST);
glBindSampler(1, 0);
#ifdef WIN32
if (irr_driver->getGLSLVersion() >= 330)
glBindSampler(1, 0);
#endif
setTexture(1, m_rtts->getRenderTarget(RTT_TMP2), GL_NEAREST, GL_NEAREST);
glBindSampler(2, 0);
#ifdef WIN32
if (irr_driver->getGLSLVersion() >= 330)
glBindSampler(2, 0);
#endif
setTexture(2, m_rtts->getRenderTarget(RTT_HALF1_R), GL_LINEAR, GL_LINEAR);
{

View File

@@ -597,9 +597,11 @@ void glUniform1iWrapper(GLuint a, int b)
void setTextureSampler(GLenum tp, GLuint texunit, GLuint tid, GLuint sid)
{
#ifdef WIN32
glActiveTexture(GL_TEXTURE0 + texunit);
glBindTexture(tp, tid);
glBindSampler(texunit, sid);
#endif
}