41 lines
682 B
C++
41 lines
682 B
C++
|
|
#ifndef SPECTRE_WINDOW_GLWINDOW_H
|
|
#define SPECTRE_WINDOW_GLWINDOW_H
|
|
|
|
#include <Spectre/Window/Window.h>
|
|
#include <Spectre/Window/GLContext.h>
|
|
|
|
namespace sp {
|
|
|
|
class GLContext;
|
|
|
|
// GLWindow represents a window that has an OpenGL context attached to it.
|
|
class GLWindow : public Window
|
|
{
|
|
public:
|
|
GLWindow();
|
|
virtual ~GLWindow();
|
|
|
|
virtual bool create(WindowDescription decription);
|
|
|
|
virtual void destroy();
|
|
|
|
bool activate(bool value);
|
|
|
|
// Enable/Disable Vertical Sync.
|
|
bool enableVSync(bool value);
|
|
|
|
void swapBuffers();
|
|
|
|
protected:
|
|
|
|
virtual void onReshape(int width, int height);
|
|
|
|
private:
|
|
|
|
GLContext* m_context;
|
|
};
|
|
|
|
} // namepsace sp
|
|
|
|
#endif /* SPECTRE_WINDOW_GLWINDOW_H */
|