First GLX implementation
Former-commit-id: 0f41eb0bd949899fce740879604f14a44f532d8a
This commit is contained in:
@@ -37,14 +37,20 @@ class NAZARA_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();
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
#if defined(NAZARA_PLATFORM_WINDOWS)
|
||||
#include <GL3/wglext.h>
|
||||
#elif defined(NAZARA_PLATFORM_LINUX)
|
||||
namespace GLX
|
||||
{
|
||||
#include <GL/glx.h>
|
||||
}
|
||||
#include <GL3/glxext.h>
|
||||
#endif
|
||||
|
||||
@@ -331,8 +335,10 @@ NAZARA_API extern PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB;
|
||||
NAZARA_API extern PFNWGLGETEXTENSIONSSTRINGEXTPROC wglGetExtensionsStringEXT;
|
||||
NAZARA_API extern PFNWGLSWAPINTERVALEXTPROC wglSwapInterval;
|
||||
#elif defined(NAZARA_PLATFORM_LINUX)
|
||||
NAZARA_API extern PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribs;
|
||||
NAZARA_API extern PFNGLXSWAPINTERVALSGIPROC glXSwapInterval;
|
||||
NAZARA_API extern GLX::PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribs;
|
||||
NAZARA_API extern GLX::PFNGLXSWAPINTERVALEXTPROC glXSwapIntervalEXT;
|
||||
NAZARA_API extern GLX::PFNGLXSWAPINTERVALMESAPROC NzglXSwapIntervalMESA;
|
||||
NAZARA_API extern GLX::PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI;
|
||||
#endif
|
||||
|
||||
#endif // NAZARA_RENDERER_OPENGL
|
||||
|
||||
Reference in New Issue
Block a user