Water sample causes buffer leaks on configuration change

Description

Original reporter: binarycrusader

1) start sample browser
2) start water sample
3) stop water sample
4) open configuration, make a change, apply

or

1) start sample browser
2) start water sample
3) open configuration, make a change, apply

16 HardwareVertexBuffers will be leaked.

This is because WaterCircle::_prepareMesh in Water.h for the samples creates and assigns 16 HardwareVertexBuffers to texcoordsVertexBuffers (a global variable!) the first time a WaterCircle object is created, but no code exists to unbind/release these buffers in Sample_Water::_shutdown().

The global variable usage here is unfortunate; my guess is this sample just needs to be cleaned up a bit and given some TLC to take care of problems like the above.

Original Mantis Ticket: http://www.ogre3d.org/mantis/view.php?id=519

Environment

None

Assignee

Murat Sari

Reporter

Philip Allgaier

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure