// Copyright (C) 2015 Jérôme Leclercq // This file is part of the "Nazara Engine - Renderer module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_RENDERBUFFER_HPP #define NAZARA_RENDERBUFFER_HPP #include #include #include #include #include #include #include #include class NzRenderBuffer; using NzRenderBufferConstRef = NzObjectRef; using NzRenderBufferLibrary = NzObjectLibrary; using NzRenderBufferRef = NzObjectRef; class NAZARA_RENDERER_API NzRenderBuffer : public NzRefCounted, NzNonCopyable { friend NzRenderBufferLibrary; friend class NzRenderer; public: NzRenderBuffer(); ~NzRenderBuffer(); bool Create(nzPixelFormat format, unsigned int width, unsigned int height); void Destroy(); unsigned int GetHeight() const; nzPixelFormat GetFormat() const; unsigned int GetWidth() const; // Fonctions OpenGL unsigned int GetOpenGLID() const; bool IsValid() const; template static NzRenderBufferRef New(Args&&... args); // Signals: NazaraSignal(OnRenderBufferDestroy, const NzRenderBuffer* /*renderBuffer*/); NazaraSignal(OnRenderBufferRelease, const NzRenderBuffer* /*renderBuffer*/); private: static bool Initialize(); static void Uninitialize(); nzPixelFormat m_pixelFormat; unsigned int m_height; unsigned int m_id; unsigned int m_width; static NzRenderBufferLibrary::LibraryMap s_library; }; #include #endif // NAZARA_RENDERBUFFER_HPP