mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Reset bind texture when texture deleted.
This commit is contained in:
parent
ea4d174e5c
commit
15f54acd5e
|
@ -76,7 +76,6 @@ namespace opengl {
|
|||
glBindImageTexture(GLuint(_params.ImageUnit), GLuint(_params.handle),
|
||||
0, GL_FALSE, GL_FALSE, GL_READ_ONLY, GLuint(_params.internalFormat));
|
||||
} else {
|
||||
//glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, GLuint(_name));
|
||||
m_bind->bind(_params.textureUnitIndex, graphics::target::TEXTURE_2D_MULTISAMPLE, _params.handle);
|
||||
glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE,
|
||||
_params.msaaLevel,
|
||||
|
@ -87,7 +86,9 @@ namespace opengl {
|
|||
}
|
||||
}
|
||||
|
||||
void reset(graphics::ObjectHandle _deleted) override {}
|
||||
void reset(graphics::ObjectHandle _deleted) override {
|
||||
m_bind->reset();
|
||||
}
|
||||
|
||||
private:
|
||||
CachedBindTexture* m_bind;
|
||||
|
@ -149,6 +150,7 @@ namespace opengl {
|
|||
|
||||
void reset(graphics::ObjectHandle _deleted) override
|
||||
{
|
||||
m_bind->reset();
|
||||
if (m_handle == _deleted)
|
||||
m_handle = graphics::ObjectHandle(0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user