Noman wrote:
The only thing that worries me (meaning needs specific checking) besides multi screen is leakage. I know that in D3D some calls return pointers that have to be released, and I don't know how GL behaves in those areas.
Did you try running these tests using the D3D debug runtime? (I'll probably run those tests soon and see what happens).
For D3D9, done this, I've checked the debug runtimes, no leaks reported so far.
For your information, you can look at "RenderSystem::_cleanupDepthBuffers". It is called (or should be) to delete all depth buffers.
Depth buffers release their surface (which should be zero after that) on the destructor (in OpenGL this means glDeleteRenderbuffersEXT gets called)
Also the destructor from the base class is virtual and detachFromAllRenderTargets() is called, so there shouldn't be any pending binding on any RT that could keep the reference count higher than 0.
In D3D9/10/11, depth buffers tagged as "manual" aren't released in the destructor and have to be released later. Manual depth buffers are used to hold the depth buffers from the backbuffer's (i.e. the main Render Window). The system expects the depth buffers to be released by the routine which created the backbuffer/RenderWindow (which is what happens, see D3D9Device::releaseRenderWindowResources)
In OGL the main backbuffer can't share it's depthbuffer with FBOs, so no need to worry there.
Regarding gDebugger, it looks marvelous if it weren't that the trial versions cuts you out the good stuff. And I'm not buying a copy for an API I barely use and keeps breaking without me being at fault.
Nevertheless, I'm modifying right now _cleanupDepthBuffers to include a boolean parameter to avoid deleting manual depth buffers, this way an application can free all unused depth buffers at will if he thinks the pool has grown very big and he doesn't need them anymore. This would for advanced users.
I'll let you know when the patch is updated
The only thing I couldn't try yet and can't guarantee it's quality at all is multi monitor. I've already asked Assaf if he could give it a try, and he agreed; I didn't heard anything from him yet.
I'm hoping I can get an extra DVI-VGA adapter next monday.
Edit
Patch updated in both SF.Net & Mirror. Apply again. It's a tiny change for _cleanupDepthBuffers