Merge pull request #1046 from cxd4/fix-glitch64-GL-extensions

[Glitch64] Fix missing GL extension prototypes on non-ES, non-WIN32 systems.
This commit is contained in:
zilmar 2016-03-27 07:34:00 +11:00
commit 512a5978ad
2 changed files with 14 additions and 7 deletions

View File

@ -50,7 +50,7 @@ typedef struct _texlist
static int nbTex = 0;
static texlist *list = NULL;
#ifdef _WIN32
#if !defined(__ANDROID__) && !defined(ANDROID)
extern PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT;
extern PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT;
extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC glCompressedTexImage2DARB;

View File

@ -46,10 +46,21 @@ extern int buffer_cleared; // mark that the buffer has been cleared, used to che
#ifdef _WIN32
#include <windows.h>
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc);
#else
#include <stdio.h>
#endif
#if defined(__ANDROID__) || defined(ANDROID)
#include "OGLESwrappers.h"
#else
#include "opengl.h"
extern "C" {
#ifndef GL_VERSION_1_3
extern PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
extern PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB;
#endif
extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
extern PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT;
@ -69,7 +80,6 @@ extern "C" {
extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
extern PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB;
extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT;
extern PFNGLSECONDARYCOLOR3FPROC glSecondaryColor3f;
extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB;
@ -78,12 +88,9 @@ extern "C" {
extern PFNGLUNIFORM4FARBPROC glUniform4fARB;
extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
extern PFNGLGETHANDLEARBPROC glGetHandleARB;
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
}
#else
#include <stdio.h>
#include "OGLESwrappers.h"
#endif // _WIN32
#endif
#include "glide.h"
void init_geometry();