Fixed crash when resources in use by the Renderer are released

Former-commit-id: 98eedb556f0387f0a5c1cafde2fc74645d1d0457
This commit is contained in:
Lynix
2013-08-26 00:40:45 +02:00
parent f1dc7b98e5
commit 72a57fbf4c
11 changed files with 228 additions and 42 deletions

View File

@@ -23,10 +23,14 @@ class NzIndexBuffer;
class NzMaterial;
class NzRenderTarget;
class NzShaderProgram;
class NzTexture;
class NzVertexBuffer;
class NAZARA_API NzRenderer
{
friend NzShaderProgram;
friend NzTexture;
public:
NzRenderer() = delete;
~NzRenderer() = delete;
@@ -96,6 +100,8 @@ class NAZARA_API NzRenderer
private:
static void EnableInstancing(bool instancing);
static bool EnsureStateUpdate();
static void OnProgramReleased(const NzShaderProgram* program);
static void OnTextureReleased(const NzTexture* texture);
static void UpdateMatrix(nzMatrixType type);
static unsigned int s_moduleReferenceCounter;