Fix GLES
This commit is contained in:
parent
ca0a605b0e
commit
d3cbc6ca0e
@ -91,6 +91,7 @@ public:
|
|||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
/** */
|
/** */
|
||||||
|
#if !defined(USE_GLES2)
|
||||||
class HeightmapSimulationShader :
|
class HeightmapSimulationShader :
|
||||||
public TextureShader<HeightmapSimulationShader, 1,
|
public TextureShader<HeightmapSimulationShader, 1,
|
||||||
core::matrix4, int, int,
|
core::matrix4, int, int,
|
||||||
@ -110,6 +111,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
}; // class HeightmapSimulationShader
|
}; // class HeightmapSimulationShader
|
||||||
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ public:
|
|||||||
} // bindVertexArray
|
} // bindVertexArray
|
||||||
}; // SkyboxShader
|
}; // SkyboxShader
|
||||||
|
|
||||||
|
#if !defined(USE_GLES2)
|
||||||
class SpecularIBLGenerator : public TextureShader<SpecularIBLGenerator, 2,
|
class SpecularIBLGenerator : public TextureShader<SpecularIBLGenerator, 2,
|
||||||
core::matrix4, float >
|
core::matrix4, float >
|
||||||
{
|
{
|
||||||
@ -70,7 +70,7 @@ public:
|
|||||||
1, "samples", ST_TEXTURE_BUFFER);
|
1, "samples", ST_TEXTURE_BUFFER);
|
||||||
}
|
}
|
||||||
}; // SpecularIBLGenerator
|
}; // SpecularIBLGenerator
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@ -47,8 +47,11 @@ GLuint TextureShaderBase::m_all_texture_types[] =
|
|||||||
/* ST_VOLUME_LINEAR_FILTERED */ GL_TEXTURE_3D,
|
/* ST_VOLUME_LINEAR_FILTERED */ GL_TEXTURE_3D,
|
||||||
/* ST_NEARED_CLAMPED_FILTERED */ GL_TEXTURE_2D,
|
/* ST_NEARED_CLAMPED_FILTERED */ GL_TEXTURE_2D,
|
||||||
/* ST_BILINEAR_CLAMPED_FILTERED */ GL_TEXTURE_2D,
|
/* ST_BILINEAR_CLAMPED_FILTERED */ GL_TEXTURE_2D,
|
||||||
/* ST_SEMI_TRILINEAR */ GL_TEXTURE_2D,
|
/* ST_SEMI_TRILINEAR */ GL_TEXTURE_2D
|
||||||
/* ST_TEXTURE_BUFFER */ GL_TEXTURE_BUFFER
|
#ifndef USE_GLES2
|
||||||
|
/* ST_TEXTURE_BUFFER */, GL_TEXTURE_BUFFER
|
||||||
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -120,8 +123,10 @@ void TextureShaderBase::bindTextureNearestClamped(GLuint texture_unit,
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void TextureShaderBase::bindTextureBuffer(GLuint texture_unit, GLuint tex_id)
|
void TextureShaderBase::bindTextureBuffer(GLuint texture_unit, GLuint tex_id)
|
||||||
{
|
{
|
||||||
|
#ifndef USE_GLES2
|
||||||
glActiveTexture(GL_TEXTURE0 + texture_unit);
|
glActiveTexture(GL_TEXTURE0 + texture_unit);
|
||||||
glBindTexture(GL_TEXTURE_BUFFER, tex_id);
|
glBindTexture(GL_TEXTURE_BUFFER, tex_id);
|
||||||
|
#endif
|
||||||
} // bindTextureBuffer
|
} // bindTextureBuffer
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -246,8 +251,10 @@ GLuint TextureShaderBase::createSamplers(SamplerTypeNew sampler_type)
|
|||||||
return createBilinearClampedSampler();
|
return createBilinearClampedSampler();
|
||||||
case ST_SEMI_TRILINEAR:
|
case ST_SEMI_TRILINEAR:
|
||||||
return createSemiTrilinearSampler();
|
return createSemiTrilinearSampler();
|
||||||
|
#ifndef USE_GLES2
|
||||||
case ST_TEXTURE_BUFFER:
|
case ST_TEXTURE_BUFFER:
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
assert(false);
|
assert(false);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -43,8 +43,12 @@ enum SamplerTypeNew
|
|||||||
ST_NEARED_CLAMPED_FILTERED,
|
ST_NEARED_CLAMPED_FILTERED,
|
||||||
ST_BILINEAR_CLAMPED_FILTERED,
|
ST_BILINEAR_CLAMPED_FILTERED,
|
||||||
ST_SEMI_TRILINEAR,
|
ST_SEMI_TRILINEAR,
|
||||||
|
#ifdef USE_GLES2
|
||||||
|
ST_MAX = ST_SEMI_TRILINEAR
|
||||||
|
#else
|
||||||
ST_TEXTURE_BUFFER,
|
ST_TEXTURE_BUFFER,
|
||||||
ST_MAX = ST_TEXTURE_BUFFER
|
ST_MAX = ST_TEXTURE_BUFFER
|
||||||
|
#endif
|
||||||
}; // SamplerTypeNew
|
}; // SamplerTypeNew
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user