Replace platform backends by SDL
This commit is contained in:
@@ -8,25 +8,11 @@
|
||||
#define NAZARA_WINDOWHANDLE_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#if defined(NAZARA_PLATFORM_SDL2)
|
||||
#elif defined(NAZARA_PLATFORM_X11)
|
||||
#include <xcb/xcb.h>
|
||||
#endif
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
#if defined(NAZARA_PLATFORM_SDL2)
|
||||
// Real type is SDL_Window
|
||||
using WindowHandle = void*;
|
||||
#elif defined(NAZARA_PLATFORM_WINDOWS)
|
||||
// http://msdn.microsoft.com/en-us/library/aa383751(v=vs.85).aspx
|
||||
using WindowHandle = void*;
|
||||
#elif defined(NAZARA_PLATFORM_X11)
|
||||
// http://en.wikipedia.org/wiki/Xlib#Data_types
|
||||
using WindowHandle = xcb_window_t;
|
||||
#else
|
||||
#error Lack of implementation: WindowHandle
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // NAZARA_WINDOWHANDLE_HPP
|
||||
|
||||
@@ -119,11 +119,6 @@
|
||||
#define NAZARA_PLATFORM_LINUX
|
||||
#define NAZARA_PLATFORM_POSIX
|
||||
|
||||
#ifndef NAZARA_PLATFORM_SDL2
|
||||
#define NAZARA_PLATFORM_GLX
|
||||
#define NAZARA_PLATFORM_X11
|
||||
#endif
|
||||
|
||||
#define NAZARA_EXPORT __attribute__((visibility ("default")))
|
||||
#define NAZARA_IMPORT __attribute__((visibility ("default")))
|
||||
/*#elif defined(__APPLE__) && defined(__MACH__)
|
||||
|
||||
@@ -20,20 +20,6 @@
|
||||
#include <GL/glcorearb.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
#if defined(NAZARA_PLATFORM_SDL2)
|
||||
#include <SDL2/SDL_video.h>
|
||||
#endif
|
||||
|
||||
#if defined(NAZARA_PLATFORM_WINDOWS)
|
||||
#include <GL/wglext.h>
|
||||
#elif defined(NAZARA_PLATFORM_GLX)
|
||||
namespace GLX
|
||||
{
|
||||
#include <GL/glx.h> // Defined in a namespace to avoid conflict
|
||||
}
|
||||
#include <GL/glxext.h>
|
||||
#endif
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
enum OpenGLExtension
|
||||
@@ -334,19 +320,6 @@ namespace Nz
|
||||
NAZARA_RENDERER_API extern PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer;
|
||||
NAZARA_RENDERER_API extern PFNGLVERTEXATTRIBLPOINTERPROC glVertexAttribLPointer;
|
||||
NAZARA_RENDERER_API extern PFNGLVIEWPORTPROC glViewport;
|
||||
#if defined(NAZARA_PLATFORM_WINDOWS)
|
||||
NAZARA_RENDERER_API extern PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormat;
|
||||
NAZARA_RENDERER_API extern PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribs;
|
||||
NAZARA_RENDERER_API extern PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB;
|
||||
NAZARA_RENDERER_API extern PFNWGLGETEXTENSIONSSTRINGEXTPROC wglGetExtensionsStringEXT;
|
||||
NAZARA_RENDERER_API extern PFNWGLSWAPINTERVALEXTPROC wglSwapInterval;
|
||||
#elif defined(NAZARA_PLATFORM_GLX)
|
||||
NAZARA_RENDERER_API extern GLX::PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribs;
|
||||
NAZARA_RENDERER_API extern GLX::PFNGLXSWAPINTERVALEXTPROC glXSwapIntervalEXT;
|
||||
NAZARA_RENDERER_API extern GLX::PFNGLXSWAPINTERVALMESAPROC NzglXSwapIntervalMESA;
|
||||
NAZARA_RENDERER_API extern GLX::PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#undef None
|
||||
|
||||
Reference in New Issue
Block a user