Made Context/RenderTarget usage constant
Former-commit-id: 07a2655ea642664bc49ca335cf5147ebf9fb9f26
This commit is contained in:
@@ -26,13 +26,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 const NzContext* GetCurrent();
|
||||
static const NzContext* GetReference();
|
||||
static NzContext* GetThreadContext();
|
||||
static const NzContext* GetThreadContext();
|
||||
static bool Initialize();
|
||||
static void Uninitialize();
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ class NAZARA_API NzRenderTarget
|
||||
virtual bool HasContext() const = 0;
|
||||
|
||||
protected:
|
||||
virtual bool Activate() = 0;
|
||||
virtual void Desactivate();
|
||||
virtual bool Activate() const = 0;
|
||||
virtual void Desactivate() const;
|
||||
};
|
||||
|
||||
#endif // NAZARA_RENDERTARGET_HPP
|
||||
|
||||
@@ -48,8 +48,8 @@ class NAZARA_API NzRenderTexture : public NzRenderTarget, NzResourceListener, Nz
|
||||
static bool IsSupported();
|
||||
|
||||
protected:
|
||||
bool Activate() override;
|
||||
void Desactivate() override;
|
||||
bool Activate() const override;
|
||||
void Desactivate() const override;
|
||||
|
||||
private:
|
||||
void OnResourceDestroy(const NzResource* resource, int index) override;
|
||||
|
||||
@@ -53,7 +53,7 @@ class NAZARA_API NzRenderWindow : public NzRenderTarget, public NzWindow
|
||||
bool HasContext() const;
|
||||
|
||||
protected:
|
||||
bool Activate() override;
|
||||
bool Activate() const override;
|
||||
|
||||
private:
|
||||
bool OnWindowCreated() override;
|
||||
|
||||
@@ -55,7 +55,7 @@ class NAZARA_API NzRenderer
|
||||
static unsigned int GetMaxTextureUnits();
|
||||
static float GetPointSize();
|
||||
static const NzShader* GetShader();
|
||||
static NzRenderTarget* GetTarget();
|
||||
static const NzRenderTarget* GetTarget();
|
||||
static NzRectui GetViewport();
|
||||
|
||||
static bool HasCapability(nzRendererCap capability);
|
||||
@@ -84,7 +84,7 @@ class NAZARA_API NzRenderer
|
||||
static void SetStencilPassOperation(nzStencilOperation passOperation);
|
||||
static void SetStencilReferenceValue(unsigned int refValue);
|
||||
static void SetStencilZFailOperation(nzStencilOperation zfailOperation);
|
||||
static bool SetTarget(NzRenderTarget* target);
|
||||
static bool SetTarget(const NzRenderTarget* target);
|
||||
static void SetTexture(nzUInt8 unit, const NzTexture* texture);
|
||||
static void SetTextureSampler(nzUInt8 textureUnit, const NzTextureSampler& sampler);
|
||||
static bool SetVertexBuffer(const NzVertexBuffer* vertexBuffer);
|
||||
|
||||
Reference in New Issue
Block a user