Platform/PlatformApplication: add createGLContext()
This commit is contained in:
parent
b1ccea1397
commit
b300310239
5 changed files with 19 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
namespace sp {
|
namespace sp {
|
||||||
|
|
||||||
class Window;
|
class Window;
|
||||||
|
class GLContext;
|
||||||
|
|
||||||
class PlatformWindow;
|
class PlatformWindow;
|
||||||
class PlatformInput;
|
class PlatformInput;
|
||||||
|
|
@ -24,6 +25,8 @@ public :
|
||||||
|
|
||||||
virtual PlatformWindow* createWindow(Window* window) = 0;
|
virtual PlatformWindow* createWindow(Window* window) = 0;
|
||||||
|
|
||||||
|
virtual GLContext* createGLContext() = 0;
|
||||||
|
|
||||||
virtual PlatformInput& getInput() = 0;
|
virtual PlatformInput& getInput() = 0;
|
||||||
|
|
||||||
MessageQueue& getMessageQueue();
|
MessageQueue& getMessageQueue();
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
#include "X11Window.h"
|
#include "X11Window.h"
|
||||||
|
#include "GLXContext.h"
|
||||||
#include "UnixApplication.h"
|
#include "UnixApplication.h"
|
||||||
#include "Xlib.h"
|
#include "Xlib.h"
|
||||||
|
|
||||||
|
|
@ -20,6 +21,11 @@ PlatformWindow* UnixApplication::createWindow(Window* window)
|
||||||
return new X11Window(window);
|
return new X11Window(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLContext* UnixApplication::createGLContext()
|
||||||
|
{
|
||||||
|
return new GLXContext();
|
||||||
|
}
|
||||||
|
|
||||||
PlatformInput& UnixApplication::getInput()
|
PlatformInput& UnixApplication::getInput()
|
||||||
{
|
{
|
||||||
return m_input;
|
return m_input;
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ public :
|
||||||
|
|
||||||
virtual PlatformWindow* createWindow(Window* window);
|
virtual PlatformWindow* createWindow(Window* window);
|
||||||
|
|
||||||
|
virtual GLContext* createGLContext();
|
||||||
|
|
||||||
virtual PlatformInput& getInput();
|
virtual PlatformInput& getInput();
|
||||||
|
|
||||||
protected :
|
protected :
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
#include "Win32Window.h"
|
#include "Win32Window.h"
|
||||||
|
#include "Win32GLContext.h"
|
||||||
#include "Win32Application.h"
|
#include "Win32Application.h"
|
||||||
|
|
||||||
namespace sp {
|
namespace sp {
|
||||||
|
|
@ -17,6 +18,11 @@ PlatformWindow* Win32Application::createWindow(Window* window)
|
||||||
return new Win32Window(window);
|
return new Win32Window(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLContext* Win32Application::createGLContext()
|
||||||
|
{
|
||||||
|
return new Win32GLContext();
|
||||||
|
}
|
||||||
|
|
||||||
PlatformInput& Win32Application::getInput()
|
PlatformInput& Win32Application::getInput()
|
||||||
{
|
{
|
||||||
return m_input;
|
return m_input;
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ public :
|
||||||
|
|
||||||
virtual PlatformWindow* createWindow(Window* window);
|
virtual PlatformWindow* createWindow(Window* window);
|
||||||
|
|
||||||
|
virtual GLContext* createGLContext();
|
||||||
|
|
||||||
virtual PlatformInput& getInput();
|
virtual PlatformInput& getInput();
|
||||||
|
|
||||||
protected :
|
protected :
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue