Refactoring and cleanup of GLInterface (now GLContext)

This commit is contained in:
Stenzek
2018-10-03 23:02:45 +10:00
parent 74b82bab3b
commit 134d967be2
39 changed files with 741 additions and 690 deletions

View File

@ -12,22 +12,28 @@ struct NSOpenGLPixelFormat;
struct NSView;
#endif
#include "Common/GL/GLInterfaceBase.h"
#include "Common/GL/GLContext.h"
class cInterfaceAGL : public cInterfaceBase
class GLContextAGL : public GLContext
{
public:
void Swap() override;
bool Create(void* window_handle, bool stereo, bool core) override;
bool Create(cInterfaceBase* main_context) override;
bool IsHeadless() const override;
std::unique_ptr<GLContext> CreateSharedContext() override;
void Shutdown() override;
bool MakeCurrent() override;
bool ClearCurrent() override;
void Shutdown() override;
void Update() override;
void SwapInterval(int interval) override;
std::unique_ptr<cInterfaceBase> CreateSharedContext() override;
private:
void Update() override;
void Swap() override;
void SwapInterval(int interval) override;
protected:
bool Initialize(void* window_handle, bool stereo, bool core) override;
bool Initialize(GLContext* main_context) override;
NSView* m_view = nullptr;
NSOpenGLContext* m_context = nullptr;
NSOpenGLPixelFormat* m_pixel_format = nullptr;