Destroy cubemaps with the scene.
This commit is contained in:
parent
7efd3bb160
commit
c1291c0412
|
@ -351,6 +351,11 @@ proc destroy*(self: Scene) =
|
|||
self.shadow_maps.destroy()
|
||||
for ubo in self.lighting_UBOs:
|
||||
ubo.destroy()
|
||||
if self.background_cubemap != nil:
|
||||
self.background_cubemap.destroy()
|
||||
for cube in self.cubemaps:
|
||||
cube.destroy()
|
||||
self.cubemaps = @[]
|
||||
self.engine.scenes.del(self.name)
|
||||
# bound textures can linger
|
||||
unbindAllTextures()
|
||||
|
|
Loading…
Reference in a new issue