Skip to content

Commit

Permalink
Fixed|Renderer: Crash when shutting down with 3D models loaded
Browse files Browse the repository at this point in the history
The reflection textures were not released in time.
  • Loading branch information
skyjake committed Jan 21, 2017
1 parent dceff8e commit 1e180d6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doomsday/apps/client/include/render/environ.h
Expand Up @@ -33,6 +33,8 @@ class Environment
public:
Environment();

void glDeinit();

de::GLTexture const &defaultReflection() const;

/**
Expand Down
5 changes: 5 additions & 0 deletions doomsday/apps/client/src/render/environ.cpp
Expand Up @@ -192,6 +192,11 @@ DENG2_PIMPL(Environment)
Environment::Environment() : d(new Impl(this))
{}

void Environment::glDeinit()
{
d->release();
}

GLTexture const &Environment::defaultReflection() const
{
return d->reflectionTextures[Impl::Interior];
Expand Down
1 change: 1 addition & 0 deletions doomsday/apps/client/src/render/rendersystem.cpp
Expand Up @@ -407,6 +407,7 @@ void RenderSystem::glInit()
void RenderSystem::glDeinit()
{
d->models.glDeinit();
d->environment.glDeinit();
}

GLShaderBank &RenderSystem::shaders()
Expand Down

0 comments on commit 1e180d6

Please sign in to comment.