OpenGLRenderer: Improve OpenGL wrapper
This commit is contained in:
@@ -19,6 +19,7 @@ namespace Nz::GL
|
||||
{
|
||||
public:
|
||||
ContextObject() = default;
|
||||
ContextObject(const Context& context, CreateArgs... args);
|
||||
ContextObject(const ContextObject&) = delete;
|
||||
ContextObject(ContextObject&& object) noexcept = default;
|
||||
~ContextObject();
|
||||
@@ -26,6 +27,8 @@ namespace Nz::GL
|
||||
bool Create(const Context& context, CreateArgs... args);
|
||||
void Destroy();
|
||||
|
||||
const Context& EnsureContext() const;
|
||||
|
||||
bool IsValid() const;
|
||||
|
||||
const Context* GetContext() const;
|
||||
@@ -39,8 +42,6 @@ namespace Nz::GL
|
||||
static constexpr GLuint InvalidObject = 0;
|
||||
|
||||
protected:
|
||||
void EnsureContext();
|
||||
|
||||
MovablePtr<const Context> m_context;
|
||||
MovableValue<GLuint> m_objectId;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user