Fix GLES
This commit is contained in:
parent
332811af84
commit
79136e0289
@ -292,6 +292,7 @@ RTT::RTT(size_t width, size_t height)
|
|||||||
glClearColor(.5, .5, .5, .5);
|
glClearColor(.5, .5, .5, .5);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||||
|
#if !defined(USE_GLES2)
|
||||||
if (CVS->isAZDOEnabled())
|
if (CVS->isAZDOEnabled())
|
||||||
{
|
{
|
||||||
uint64_t handle =
|
uint64_t handle =
|
||||||
@ -315,16 +316,19 @@ RTT::RTT(size_t width, size_t height)
|
|||||||
glMakeTextureHandleResidentARB(handle);
|
glMakeTextureHandleResidentARB(handle);
|
||||||
m_prefilled_handles.push_back(handle);
|
m_prefilled_handles.push_back(handle);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
RTT::~RTT()
|
RTT::~RTT()
|
||||||
{
|
{
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||||
|
#if !defined(USE_GLES2)
|
||||||
if (CVS->isAZDOEnabled())
|
if (CVS->isAZDOEnabled())
|
||||||
{
|
{
|
||||||
for (uint64_t& handle : m_prefilled_handles)
|
for (uint64_t& handle : m_prefilled_handles)
|
||||||
glMakeTextureHandleNonResidentARB(handle);
|
glMakeTextureHandleNonResidentARB(handle);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
glDeleteTextures(RTT_COUNT, RenderTargetTextures);
|
glDeleteTextures(RTT_COUNT, RenderTargetTextures);
|
||||||
glDeleteTextures(1, &DepthStencilTexture);
|
glDeleteTextures(1, &DepthStencilTexture);
|
||||||
if (CVS->isShadowEnabled())
|
if (CVS->isShadowEnabled())
|
||||||
|
@ -60,6 +60,7 @@ static std::vector<uint64_t> texture_handles;
|
|||||||
|
|
||||||
void resetTextureTable()
|
void resetTextureTable()
|
||||||
{
|
{
|
||||||
|
#if !defined(USE_GLES2)
|
||||||
if (CVS->isAZDOEnabled())
|
if (CVS->isAZDOEnabled())
|
||||||
{
|
{
|
||||||
// Driver seems to crash if texture handles are not cleared...
|
// Driver seems to crash if texture handles are not cleared...
|
||||||
@ -70,6 +71,7 @@ void resetTextureTable()
|
|||||||
Shaders::ObjectPass1Shader::getInstance()->recreateTrilinearSampler(0);
|
Shaders::ObjectPass1Shader::getInstance()->recreateTrilinearSampler(0);
|
||||||
texture_handles.clear();
|
texture_handles.clear();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
AlreadyTransformedTexture.clear();
|
AlreadyTransformedTexture.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user