netgen/libsrc/include/incopengl.hpp

59 lines
2.2 KiB
C++
Raw Normal View History

#ifndef INCOPENGL_HPP___
#define INCOPENGL_HPP___
2014-10-08 18:46:25 +06:00
#define GL_GLEXT_PROTOTYPES
#include <mystdlib.h>
#include <mydefs.hpp>
2014-10-08 18:46:25 +06:00
2024-02-11 15:02:18 +05:00
2020-09-09 16:04:21 +05:00
# ifdef __APPLE__
2019-08-27 09:18:17 +05:00
#define GL_SILENCE_DEPRECATION
#define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
# include <OpenGL/gl3.h>
2014-10-08 18:46:25 +06:00
# include <OpenGL/glu.h>
# else
# include <GL/gl.h>
# include <GL/glu.h>
# endif
#ifdef TOGL_X11
// parallel
#define GLX_GLXEXT_PROTOTYPES
#include <GL/glx.h>
#include <GL/glxext.h>
#endif
#ifdef WIN32
2014-10-08 18:46:25 +06:00
// part of OpenGL 1.2, but not in Microsoft's OpenGL 1.1 header:
2017-12-05 02:32:47 +05:00
// GL version should be checked at runtime
#define GL_CLAMP_TO_EDGE 0x812F
#define GL_ARRAY_BUFFER 0x8892
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
#define GL_STATIC_DRAW 0x88E4
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
#define GL_FRAMEBUFFER 0x8D40
#define GL_RENDERBUFFER 0x8D41
#define GL_DEPTH_ATTACHMENT 0x8D00
#define GL_COLOR_ATTACHMENT0 0x8CE0
typedef ptrdiff_t GLintptr;
typedef ptrdiff_t GLsizeiptr;
extern void (*glBindBuffer) (GLenum a, GLuint b);
extern void (*glDeleteBuffers) (GLsizei a, const GLuint *b);
extern void (*glGenBuffers) (GLsizei a, GLuint *b);
extern void (*glBufferData) (GLenum a, GLsizeiptr b, const GLvoid *c, GLenum d);
extern void (*glBufferSubData) (GLenum a, GLintptr b, GLsizeiptr c, const GLvoid *d);
extern GLenum (*glCheckFramebufferStatus) (GLenum target);
extern void (*glBindFramebuffer) (GLenum target, GLuint framebuffer);
extern void (*glBindRenderbuffer) (GLenum target, GLuint renderbuffer);
extern void (*glDeleteFramebuffers) (GLsizei n, const GLuint *framebuffers);
extern void (*glDeleteRenderbuffers) (GLsizei n, const GLuint *renderbuffers);
extern void (*glGenFramebuffers) (GLsizei n, GLuint *framebuffers);
extern void (*glGenRenderbuffers) (GLsizei n, GLuint *renderbuffers);
extern void (*glRenderbufferStorage) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
extern void (*glFramebufferRenderbuffer) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
2014-10-08 18:46:25 +06:00
#endif
DLL_HEADER void LoadOpenGLFunctionPointers();
#endif // INCOPENGL_HPP___