Fixed GLES
This commit is contained in:
parent
a3c78a7245
commit
6f78f5b9b9
@ -200,6 +200,7 @@ void GL3DrawPolicy::drawReflectiveShadowMap(const DrawCalls& draw_calls,
|
||||
// ----------------------------------------------------------------------------
|
||||
void IndirectDrawPolicy::drawSolidFirstPass(const DrawCalls& draw_calls) const
|
||||
{
|
||||
#if !defined(USE_GLES2)
|
||||
//TODO: find a way to add TextureMarix in instanced shaders,
|
||||
//and remove these four lines
|
||||
renderMeshes1stPass<DefaultMaterial, 2, 1>();
|
||||
@ -208,6 +209,7 @@ void IndirectDrawPolicy::drawSolidFirstPass(const DrawCalls& draw_calls) const
|
||||
renderMeshes1stPass<AlphaRef, 3, 2, 1>();
|
||||
|
||||
draw_calls.drawIndirectSolidFirstPass();
|
||||
#endif //!defined(USE_GLES2)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -215,6 +217,7 @@ void IndirectDrawPolicy::drawSolidSecondPass (const DrawCalls& draw_calls,
|
||||
const std::vector<uint64_t>& handles,
|
||||
const std::vector<GLuint>& prefilled_tex) const
|
||||
{
|
||||
#if !defined(USE_GLES2)
|
||||
//TODO: find a way to add TextureMatrix in instanced shaders,
|
||||
//and remove these four lines
|
||||
renderMeshes2ndPass<DefaultMaterial, 3, 1> (handles, prefilled_tex);
|
||||
@ -223,12 +226,15 @@ void IndirectDrawPolicy::drawSolidSecondPass (const DrawCalls& draw_calls,
|
||||
renderMeshes2ndPass<SplattingMat, 1 > (handles, prefilled_tex);
|
||||
|
||||
draw_calls.drawIndirectSolidSecondPass(prefilled_tex);
|
||||
#endif //!defined(USE_GLES2)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void IndirectDrawPolicy::drawNormals(const DrawCalls& draw_calls) const
|
||||
{
|
||||
#if !defined(USE_GLES2)
|
||||
draw_calls.drawIndirectNormals();
|
||||
#endif //!defined(USE_GLES2)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -248,21 +254,26 @@ void IndirectDrawPolicy::drawGlow(const DrawCalls& draw_calls,
|
||||
// ----------------------------------------------------------------------------
|
||||
void IndirectDrawPolicy::drawShadows(const DrawCalls& draw_calls, unsigned cascade) const
|
||||
{
|
||||
#if !defined(USE_GLES2)
|
||||
draw_calls.drawIndirectShadows(cascade);
|
||||
#endif //!defined(USE_GLES2)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void IndirectDrawPolicy::drawReflectiveShadowMap(const DrawCalls& draw_calls,
|
||||
const core::matrix4 &rsm_matrix) const
|
||||
{
|
||||
#if !defined(USE_GLES2)
|
||||
drawRSM<SplattingMat, 1>(rsm_matrix); //TODO: write instanced splatting RSM shader and remove this line
|
||||
draw_calls.drawIndirectReflectiveShadowMaps(rsm_matrix);
|
||||
draw_calls.drawIndirectReflectiveShadowMaps(rsm_matrix);
|
||||
#endif //!defined(USE_GLES2)
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void MultidrawPolicy::drawSolidFirstPass(const DrawCalls& draw_calls) const
|
||||
{
|
||||
#if !defined(USE_GLES2)
|
||||
//TODO: find a way to add TextureMarix in instanced shaders,
|
||||
//and remove these four lines
|
||||
renderMeshes1stPass<DefaultMaterial, 2, 1>();
|
||||
@ -271,6 +282,7 @@ void MultidrawPolicy::drawSolidFirstPass(const DrawCalls& draw_calls) const
|
||||
renderMeshes1stPass<AlphaRef, 3, 2, 1>();
|
||||
|
||||
draw_calls.multidrawSolidFirstPass();
|
||||
#endif //!defined(USE_GLES2)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -278,6 +290,7 @@ void MultidrawPolicy::drawSolidSecondPass (const DrawCalls& draw_calls,
|
||||
const std::vector<uint64_t>& handles,
|
||||
const std::vector<GLuint>& prefilled_tex) const
|
||||
{
|
||||
#if !defined(USE_GLES2)
|
||||
//TODO: find a way to add TextureMarix in instanced shaders,
|
||||
//and remove these four lines
|
||||
renderMeshes2ndPass<DefaultMaterial, 3, 1> (handles, prefilled_tex);
|
||||
@ -286,6 +299,7 @@ void MultidrawPolicy::drawSolidSecondPass (const DrawCalls& draw_calls,
|
||||
renderMeshes2ndPass<SplattingMat, 1 > (handles, prefilled_tex);
|
||||
|
||||
draw_calls.multidrawSolidSecondPass(handles);
|
||||
#endif //!defined(USE_GLES2)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -294,25 +308,31 @@ void MultidrawPolicy::drawGlow(const DrawCalls& draw_calls,
|
||||
{
|
||||
#if !defined(USE_GLES2)
|
||||
draw_calls.multidrawGlow();
|
||||
#endif
|
||||
#endif //!defined(USE_GLES2)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void MultidrawPolicy::drawNormals(const DrawCalls& draw_calls) const
|
||||
{
|
||||
#if !defined(USE_GLES2)
|
||||
draw_calls.multidrawNormals();
|
||||
#endif //!defined(USE_GLES2)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void MultidrawPolicy::drawShadows(const DrawCalls& draw_calls, unsigned cascade) const
|
||||
{
|
||||
#if !defined(USE_GLES2)
|
||||
draw_calls.multidrawShadows(cascade);
|
||||
#endif //!defined(USE_GLES2)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void MultidrawPolicy::drawReflectiveShadowMap(const DrawCalls& draw_calls,
|
||||
const core::matrix4 &rsm_matrix) const
|
||||
{
|
||||
#if !defined(USE_GLES2)
|
||||
drawRSM<SplattingMat, 1>(rsm_matrix); //TODO: add instanced splatting RSM shader
|
||||
draw_calls.multidrawReflectiveShadowMaps(rsm_matrix);
|
||||
draw_calls.multidrawReflectiveShadowMaps(rsm_matrix);
|
||||
#endif //!defined(USE_GLES2)
|
||||
}
|
||||
|
@ -185,6 +185,7 @@ void AbstractGeometryPasses::setFirstPassRenderTargets(const std::vector<GLuint>
|
||||
{
|
||||
m_prefilled_textures = prefilled_textures;
|
||||
|
||||
#if !defined(USE_GLES2)
|
||||
if (CVS->isAZDOEnabled())
|
||||
{
|
||||
m_textures_handles.clear();
|
||||
@ -197,7 +198,8 @@ void AbstractGeometryPasses::setFirstPassRenderTargets(const std::vector<GLuint>
|
||||
glMakeTextureHandleResidentARB(handle);
|
||||
m_textures_handles.push_back(handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !defined(USE_GLES2)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user