Merge branch 'master' into NDK

Conflicts:
	build/scripts/module/renderer.lua
	build/scripts/module/utility.lua
	include/Nazara/Renderer/OpenGL.hpp
	src/Nazara/Core/String.cpp

Former-commit-id: 0a8054be56f01b12c604c88b829cb10b490a9d6f
This commit is contained in:
Lynix
2015-09-20 23:41:21 +02:00
45 changed files with 3702 additions and 70 deletions

View File

@@ -180,10 +180,10 @@ class NAZARA_CORE_API NzString : public NzHashable
const char* end() const;
void push_front(char c);
void push_back(char c);
/*char* rbegin();
const char* rbegin() const;
char* rend();
const char* rend() const;*/
//char* rbegin();
//const char* rbegin() const;
//char* rend();
//const char* rend() const;
typedef const char& const_reference;
typedef char* iterator;

View File

@@ -114,9 +114,10 @@
#define _WIN32_WINNT NAZARA_WINNT
#endif
#endif
#elif defined(__linux__)
#elif defined(__linux__) || defined(__unix__)
#define NAZARA_PLATFORM_LINUX
#define NAZARA_PLATFORM_POSIX
#define NAZARA_PLATFORM_X11
#define NAZARA_EXPORT __attribute__((visibility ("default")))
#define NAZARA_IMPORT __attribute__((visibility ("default")))

View File

@@ -35,14 +35,20 @@ class NAZARA_RENDERER_API NzContext : public NzRefCounted
~NzContext();
bool Create(const NzContextParameters& parameters = NzContextParameters());
void Destroy();
void EnableVerticalSync(bool enabled);
const NzContextParameters& GetParameters() const;
bool IsActive() const;
bool SetActive(bool active) const;
void SwapBuffers();
static bool EnsureContext();
static const NzContext* GetCurrent();
static const NzContext* GetReference();
static const NzContext* GetThreadContext();

View File

@@ -22,6 +22,10 @@
#if defined(NAZARA_PLATFORM_WINDOWS)
#include <GL3/wglext.h>
#elif defined(NAZARA_PLATFORM_LINUX)
namespace GLX
{
#include <GL3/glx.h>
}
#include <GL3/glxext.h>
#endif
@@ -331,8 +335,10 @@ NAZARA_RENDERER_API extern PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStr
NAZARA_RENDERER_API extern PFNWGLGETEXTENSIONSSTRINGEXTPROC wglGetExtensionsStringEXT;
NAZARA_RENDERER_API extern PFNWGLSWAPINTERVALEXTPROC wglSwapInterval;
#elif defined(NAZARA_PLATFORM_LINUX)
NAZARA_RENDERER_API extern PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribs;
NAZARA_RENDERER_API extern PFNGLXSWAPINTERVALSGIPROC glXSwapInterval;
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
#endif // NAZARA_RENDERER_OPENGL

View File

@@ -13,8 +13,9 @@
// http://msdn.microsoft.com/en-us/library/aa383751(v=vs.85).aspx
typedef void* NzWindowHandle;
#elif defined(NAZARA_PLATFORM_LINUX)
#include <xcb/xcb.h>
// http://en.wikipedia.org/wiki/Xlib#Data_types
typedef unsigned long NzWindowHandle;
using NzWindowHandle = xcb_window_t;
#else
#error Lack of implementation: WindowHandle
#endif