Fixed crash when resources in use by the Renderer are released
Former-commit-id: 98eedb556f0387f0a5c1cafde2fc74645d1d0457
This commit is contained in:
@@ -32,13 +32,13 @@ class NAZARA_API NzContext : public NzResource
|
||||
|
||||
const NzContextParameters& GetParameters() const;
|
||||
bool IsActive() const;
|
||||
bool SetActive(bool active);
|
||||
bool SetActive(bool active) const;
|
||||
void SwapBuffers();
|
||||
|
||||
static bool EnsureContext();
|
||||
static NzContext* GetCurrent();
|
||||
static NzContext* GetReference();
|
||||
static NzContext* GetThreadContext();
|
||||
static const NzContext* GetCurrent();
|
||||
static const NzContext* GetReference();
|
||||
static const NzContext* GetThreadContext();
|
||||
static bool Initialize();
|
||||
static void Uninitialize();
|
||||
|
||||
|
||||
@@ -133,8 +133,8 @@ class NAZARA_API NzOpenGL
|
||||
static GLenum TextureTargetProxy[nzImageType_Max+1];
|
||||
|
||||
private:
|
||||
static void OnContextDestruction(NzContext* context);
|
||||
static void OnContextChange(NzContext* newContext);
|
||||
static void OnContextDestruction(const NzContext* context);
|
||||
static void OnContextChange(const NzContext* newContext);
|
||||
};
|
||||
|
||||
NAZARA_API extern PFNGLACTIVETEXTUREPROC glActiveTexture;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user