Renderer/Renderer: Replace listeners by signals

Former-commit-id: c1293f7f7cc31c4122ba866fc44d93188917ad93
This commit is contained in:
Lynix
2015-06-07 16:52:19 +02:00
parent 022f082363
commit 004b53c590
18 changed files with 160 additions and 170 deletions

View File

@@ -12,6 +12,7 @@
#include <Nazara/Core/ObjectListenerWrapper.hpp>
#include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/RefCounted.hpp>
#include <Nazara/Core/Signal.hpp>
#include <Nazara/Renderer/ContextParameters.hpp>
#include <memory>
#include <vector>
@@ -49,6 +50,8 @@ class NAZARA_API NzContext : public NzRefCounted
static const NzContext* GetReference();
static const NzContext* GetThreadContext();
NazaraSignal(OnContextRelease, const NzContext*); //< me
private:
static bool Initialize();
static void Uninitialize();

View File

@@ -110,8 +110,12 @@ class NAZARA_API NzRenderer
private:
static void EnableInstancing(bool instancing);
static bool EnsureStateUpdate();
static void OnContextRelease(const NzContext* context);
static void OnIndexBufferRelease(const NzIndexBuffer* indexBuffer);
static void OnShaderReleased(const NzShader* shader);
static void OnTextureReleased(const NzTexture* texture);
static void OnVertexBufferRelease(const NzVertexBuffer* vertexBuffer);
static void OnVertexDeclarationRelease(const NzVertexDeclaration* vertexDeclaration);
static void UpdateMatrix(nzMatrixType type);
static unsigned int s_moduleReferenceCounter;