Spectre/Window/Window: refactor out GLContext specific code to its own class (GLWindow)
This commit is contained in:
parent
2de3bd93f7
commit
b1ccea1397
7 changed files with 120 additions and 55 deletions
|
|
@ -5,7 +5,6 @@
|
|||
#include "DisplayMode.h"
|
||||
#include "WindowDescription.h"
|
||||
#include <Spectre/Math/Vector2.h>
|
||||
#include <Spectre/Window/GLContext.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
|
|
@ -28,9 +27,9 @@ public :
|
|||
Window();
|
||||
virtual ~Window();
|
||||
|
||||
bool create(WindowDescription decription);
|
||||
virtual bool create(WindowDescription decription);
|
||||
|
||||
void destroy();
|
||||
virtual void destroy();
|
||||
|
||||
void setSize(unsigned int width, unsigned int height);
|
||||
|
||||
|
|
@ -58,18 +57,11 @@ public :
|
|||
|
||||
void grabCursor(bool value);
|
||||
|
||||
bool activate(bool value);
|
||||
|
||||
// Enable/Disable Vertical Sync.
|
||||
bool enableVSync(bool value);
|
||||
|
||||
void swapBuffers();
|
||||
|
||||
protected :
|
||||
|
||||
void init();
|
||||
|
||||
void onReshape(int width, int height);
|
||||
virtual void onReshape(int width, int height);
|
||||
|
||||
protected :
|
||||
enum Mode m_fmode;
|
||||
|
|
@ -84,8 +76,6 @@ protected :
|
|||
std::string m_caption;
|
||||
|
||||
PlatformWindow* m_impl;
|
||||
|
||||
GLContext* m_context;
|
||||
};
|
||||
|
||||
} // namepsace sp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue