2012-11-15 01:39:56 +02:00
|
|
|
#pragma once
|
2014-03-12 02:36:17 +10:00
|
|
|
#ifndef _WIN32
|
|
|
|
|
#include <GL/glew.h>
|
|
|
|
|
#endif
|
2012-11-15 01:39:56 +02:00
|
|
|
|
2013-11-24 10:17:18 +01:00
|
|
|
#ifdef _WIN32
|
2014-08-29 02:49:26 +04:00
|
|
|
#include <Windows.h>
|
2014-05-01 19:29:28 +02:00
|
|
|
#include "GL/gl.h"
|
2016-03-18 14:13:52 +00:00
|
|
|
#include <glext.h>
|
2013-06-30 11:46:29 +03:00
|
|
|
typedef BOOL (WINAPI* PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
|
|
|
|
|
|
|
|
|
#define OPENGL_PROC(p, n) extern p gl##n
|
2017-08-13 20:41:55 +03:00
|
|
|
#define WGL_PROC(p, n) extern p wgl##n
|
2013-06-30 11:46:29 +03:00
|
|
|
#define OPENGL_PROC2(p, n, tn) OPENGL_PROC(p, n)
|
2014-04-27 19:28:03 +02:00
|
|
|
#include "GLProcTable.h"
|
2012-11-15 01:39:56 +02:00
|
|
|
#undef OPENGL_PROC
|
2017-08-13 20:41:55 +03:00
|
|
|
#undef WGL_PROC
|
2013-06-30 11:46:29 +03:00
|
|
|
#undef OPENGL_PROC2
|
|
|
|
|
|
2014-05-01 19:29:28 +02:00
|
|
|
#elif defined(__APPLE__)
|
2014-04-29 00:51:49 +02:00
|
|
|
#include <OpenGL/gl.h>
|
|
|
|
|
#include <OpenGL/glu.h>
|
|
|
|
|
|
2014-02-21 17:13:57 +01:00
|
|
|
#else
|
2014-04-29 00:51:49 +02:00
|
|
|
#include <GL/gl.h>
|
2014-02-21 17:13:57 +01:00
|
|
|
#include <GL/glx.h>
|
|
|
|
|
#include <GL/glxext.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
2016-06-12 16:37:30 +03:00
|
|
|
#ifndef GL_TEXTURE_BUFFER_BINDING
|
|
|
|
|
//During spec release, this enum was removed during upgrade from ARB equivalent
|
|
|
|
|
//See https://www.khronos.org/bugzilla/show_bug.cgi?id=844
|
|
|
|
|
#define GL_TEXTURE_BUFFER_BINDING 0x8C2A
|
|
|
|
|
#endif
|
|
|
|
|
|
2015-10-04 01:45:26 +03:00
|
|
|
namespace gl
|
|
|
|
|
{
|
|
|
|
|
void init();
|
2017-08-13 20:41:55 +03:00
|
|
|
void set_swapinterval(int interval);
|
2015-10-04 01:45:26 +03:00
|
|
|
}
|