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 {
|
||||
|
||||
class Window;
|
||||
class GLContext;
|
||||
|
||||
class PlatformWindow;
|
||||
class PlatformInput;
|
||||
|
|
@ -24,6 +25,8 @@ public :
|
|||
|
||||
virtual PlatformWindow* createWindow(Window* window) = 0;
|
||||
|
||||
virtual GLContext* createGLContext() = 0;
|
||||
|
||||
virtual PlatformInput& getInput() = 0;
|
||||
|
||||
MessageQueue& getMessageQueue();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
#include "X11Window.h"
|
||||
#include "GLXContext.h"
|
||||
#include "UnixApplication.h"
|
||||
#include "Xlib.h"
|
||||
|
||||
|
|
@ -20,6 +21,11 @@ PlatformWindow* UnixApplication::createWindow(Window* window)
|
|||
return new X11Window(window);
|
||||
}
|
||||
|
||||
GLContext* UnixApplication::createGLContext()
|
||||
{
|
||||
return new GLXContext();
|
||||
}
|
||||
|
||||
PlatformInput& UnixApplication::getInput()
|
||||
{
|
||||
return m_input;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ public :
|
|||
|
||||
virtual PlatformWindow* createWindow(Window* window);
|
||||
|
||||
virtual GLContext* createGLContext();
|
||||
|
||||
virtual PlatformInput& getInput();
|
||||
|
||||
protected :
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
#include "Win32Window.h"
|
||||
#include "Win32GLContext.h"
|
||||
#include "Win32Application.h"
|
||||
|
||||
namespace sp {
|
||||
|
|
@ -17,6 +18,11 @@ PlatformWindow* Win32Application::createWindow(Window* window)
|
|||
return new Win32Window(window);
|
||||
}
|
||||
|
||||
GLContext* Win32Application::createGLContext()
|
||||
{
|
||||
return new Win32GLContext();
|
||||
}
|
||||
|
||||
PlatformInput& Win32Application::getInput()
|
||||
{
|
||||
return m_input;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ public :
|
|||
|
||||
virtual PlatformWindow* createWindow(Window* window);
|
||||
|
||||
virtual GLContext* createGLContext();
|
||||
|
||||
virtual PlatformInput& getInput();
|
||||
|
||||
protected :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue