Initial commit
This commit is contained in:
59
libsst-glapi/GLAPIPrivate.h
Normal file
59
libsst-glapi/GLAPIPrivate.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
GLAPIPrivate.h
|
||||
Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
Created: 1/18/2013
|
||||
|
||||
Purpose:
|
||||
|
||||
Private header for libsst-glapi.
|
||||
Not to be distributed as part of public SDK
|
||||
|
||||
License:
|
||||
|
||||
This program is free software. It comes without any warranty, to
|
||||
the extent permitted by applicable law. You can redistribute it
|
||||
and/or modify it under the terms of the Do What The Fuck You Want
|
||||
To Public License, Version 2, as published by Sam Hocevar. See
|
||||
http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifndef _GLAPIPRIVATE_H
|
||||
#define _GLAPIPRIVATE_H
|
||||
|
||||
#include <pstdint.h> /* uintptr_t */
|
||||
|
||||
struct SST_GLAPI;
|
||||
|
||||
typedef struct GLAPIResolver
|
||||
{
|
||||
void* privateFields[2]; /* Platform dependent fields */
|
||||
} GLAPIResolver;
|
||||
|
||||
/* THESE ARE PLATFORM SPECIFIC { */
|
||||
|
||||
/* Load libGL by name */
|
||||
void* openLibGL(const char* path);
|
||||
|
||||
/* Close libGL by name */
|
||||
void closeLibGL(void* libGL);
|
||||
|
||||
/* Get a resolver struct */
|
||||
int getResolver(void* oglLib, GLAPIResolver* resolver);
|
||||
|
||||
/* Return default OpenGL library name for platform */
|
||||
const char* defaultLibGLName();
|
||||
|
||||
/* Resolve a GL symbol */
|
||||
void* resolveGLSymbol(const GLAPIResolver* resolver, const char* name);
|
||||
|
||||
/* } END PLATFORM-SPECIFIC */
|
||||
|
||||
/* Resolve ALL GL symbols */
|
||||
void resolveGLAPI(const GLAPIResolver* resolver, struct SST_GLAPI* api);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
53
libsst-glapi/Makefile
Normal file
53
libsst-glapi/Makefile
Normal file
@@ -0,0 +1,53 @@
|
||||
# libsst-glapi/Makefile
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 12/12/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for libsst-glapi
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
BINNAME := $(DIST)/libsst-glapi.a
|
||||
ifeq ($(TARGET),debug)
|
||||
BINNAME := $(subst .a,_d.a, $(BINNAME))
|
||||
endif
|
||||
|
||||
SRC := SST_GLAPIStruct.c \
|
||||
SST_GLAPIContext.c
|
||||
|
||||
# Add platform specific code
|
||||
|
||||
ifeq ($(OS),Darwin)
|
||||
LIBGL_PLATFORM := MacOSX
|
||||
else ifeq ($(SUBSYSTEM),Solaris)
|
||||
LIBGL_PLATFORM := POSIX
|
||||
else
|
||||
LIBGL_PLATFORM := $(SUBSYSTEM)
|
||||
endif
|
||||
|
||||
include sources-$(LIBGL_PLATFORM).mk
|
||||
|
||||
OBJ := $(addprefix obj/$(ARCH)/$(TARGET)/,$(subst .c,.o,$(SRC)))
|
||||
|
||||
$(shell mkdir -p obj/$(ARCH)/$(TARGET))
|
||||
|
||||
$(BINNAME): $(OBJ)
|
||||
$(AR) cru $@ $+
|
||||
$(RANLIB) $@
|
||||
|
||||
|
||||
# *.c files to *.o files
|
||||
obj/$(ARCH)/$(TARGET)/%.o: %.c
|
||||
@echo CC $@
|
||||
@$(CC) $(CFLAGS) -c $*.c -o obj/$(ARCH)/$(TARGET)/$*.o
|
||||
|
||||
# CLEAN
|
||||
clean:
|
||||
@-rm -r -f obj $(DIST)/libsst-glapi*.a
|
||||
228
libsst-glapi/SST_GLAPIContext.c
Normal file
228
libsst-glapi/SST_GLAPIContext.c
Normal file
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
SST_GLAPIContext.c
|
||||
Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
Created: 12/12/2012
|
||||
|
||||
Purpose:
|
||||
|
||||
GL API context init/shutdown
|
||||
|
||||
License:
|
||||
|
||||
This program is free software. It comes without any warranty, to
|
||||
the extent permitted by applicable law. You can redistribute it
|
||||
and/or modify it under the terms of the Do What The Fuck You Want
|
||||
To Public License, Version 2, as published by Sam Hocevar. See
|
||||
http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
*/
|
||||
|
||||
#include <SST/SST_GLAPI.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "GLAPIPrivate.h"
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Thread-local variable with GLAPI context */
|
||||
#ifdef _WIN32
|
||||
__declspec(thread) SST_GLAPI* __sstglctx = NULL;
|
||||
#else
|
||||
__thread SST_GLAPI* __sstglctx = NULL;
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* strdup() implementation */
|
||||
static char* dupstr(const char* s);
|
||||
|
||||
/* Unload libGL / libGL name, erase pointers */
|
||||
static void freeGLAPI(SST_GLAPI* api);
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
int SST_GLAPI_InitForThread(const char* libGLName)
|
||||
{
|
||||
SST_GLAPI* api = __sstglctx;
|
||||
void* libGL;
|
||||
char* libName;
|
||||
GLAPIResolver resolver;
|
||||
|
||||
/*
|
||||
Generally, we need to:
|
||||
1) Open the libGL implementation
|
||||
2) Verify that this is in fact, an OpenGL implementation
|
||||
3) Resolve the OpenGL symbols
|
||||
|
||||
We have to take care to unload the old libGL first, and
|
||||
make sure to re-use the same SST_GLAPI value in the TLS
|
||||
area. If no SST_GLAPI TLS value exists, create and store it.
|
||||
*/
|
||||
|
||||
/* Free any previous API in use */
|
||||
if(api != NULL)
|
||||
freeGLAPI(api);
|
||||
|
||||
/* No libGL name provided? */
|
||||
if(libGLName == NULL)
|
||||
libGLName = defaultLibGLName(); /* Use default */
|
||||
|
||||
/* Duplicate the name of the library for future reference */
|
||||
libName = dupstr(libGLName);
|
||||
if(libName == NULL)
|
||||
return 0;
|
||||
|
||||
/* Attempt to open libGL by name */
|
||||
libGL = openLibGL(libName);
|
||||
if(libGL == NULL)
|
||||
{
|
||||
closeLibGL(libGL);
|
||||
free(libName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Get pointer to symbol resolving function. If this isn't a valid libGL
|
||||
implementation, this will fail (e.g. specifying "libc.so.6" would fail here) */
|
||||
if(getResolver(libGL, &resolver) == 0)
|
||||
{
|
||||
closeLibGL(libGL);
|
||||
free(libName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* No SST_GLAPI for this thread -- allocate it now */
|
||||
if(api == NULL)
|
||||
{
|
||||
api = (SST_GLAPI*)calloc(1, sizeof(SST_GLAPI));
|
||||
if(api == NULL)
|
||||
{
|
||||
closeLibGL(libGL);
|
||||
free(libName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Save API pointer */
|
||||
__sstglctx = api;
|
||||
}
|
||||
|
||||
/* Resolve all symbols and save libGL handle */
|
||||
resolveGLAPI(&resolver, api);
|
||||
api->libGL = libGL;
|
||||
api->libGLName = libName;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
void SST_GLAPI_ShutdownForThread()
|
||||
{
|
||||
SST_GLAPI* api = __sstglctx;
|
||||
|
||||
if(api != NULL)
|
||||
{
|
||||
freeGLAPI(api);
|
||||
free(api);
|
||||
__sstglctx = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
SST_GLAPI* SST_GLAPI_GetThreadGLAPI()
|
||||
{
|
||||
return __sstglctx;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
int SST_GLAPI_CopyForThread(const SST_GLAPI* newapi)
|
||||
{
|
||||
SST_GLAPI* api = __sstglctx;
|
||||
void* libGL;
|
||||
char* libGLName;
|
||||
|
||||
if(newapi->libGL != NULL && newapi->libGLName != NULL)
|
||||
{
|
||||
/* Re-open libGL (to increment reference count) */
|
||||
libGL = openLibGL(newapi->libGLName);
|
||||
if(libGL == NULL)
|
||||
return 0;
|
||||
|
||||
/* Duplicate libGL name */
|
||||
libGLName = dupstr(newapi->libGLName);
|
||||
if(libGLName == NULL)
|
||||
{
|
||||
closeLibGL(libGL);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else /* Not using a libGL implementation (e.g. user functions) */
|
||||
{
|
||||
libGL = NULL;
|
||||
libGLName = NULL;
|
||||
}
|
||||
|
||||
/* No previous API pointer? */
|
||||
if(api == NULL)
|
||||
{
|
||||
/* Allocate a new one */
|
||||
api = (SST_GLAPI*)calloc(1, sizeof(SST_GLAPI));
|
||||
if(api == NULL)
|
||||
{
|
||||
if(libGL != NULL)
|
||||
closeLibGL(libGL);
|
||||
if(libGLName != NULL)
|
||||
free(libGLName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Save API pointer */
|
||||
__sstglctx = api;
|
||||
|
||||
}
|
||||
|
||||
/* Copy API, but save the new libGL name and libGL handle */
|
||||
memcpy(api, newapi, sizeof(SST_GLAPI));
|
||||
api->libGL = libGL;
|
||||
api->libGLName = libGLName;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* strdup() implementation */
|
||||
static char* dupstr(const char* s)
|
||||
{
|
||||
size_t len;
|
||||
char* copy;
|
||||
|
||||
len = strlen(s);
|
||||
copy = malloc(len+1);
|
||||
if(copy == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Copy whole string (including null terminator) */
|
||||
memcpy(copy, s, len+1);
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
static void freeGLAPI(SST_GLAPI* api)
|
||||
{
|
||||
/* Free name of library in use */
|
||||
if(api->libGLName)
|
||||
free(api->libGLName);
|
||||
|
||||
/* Close the library itself */
|
||||
if(api->libGL)
|
||||
closeLibGL(api->libGL);
|
||||
|
||||
/* In case we downgrade in GL version, erase previous pointers */
|
||||
memset(api, 0, sizeof(SST_GLAPI));
|
||||
}
|
||||
|
||||
65
libsst-glapi/SST_GLAPIResolve_MacOSX.c
Normal file
65
libsst-glapi/SST_GLAPIResolve_MacOSX.c
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
SST_GLAPIResolve_MacOSX.c
|
||||
Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
Created: 4/16/2013
|
||||
|
||||
Purpose:
|
||||
|
||||
Runtime OpenGL symbol resolution (MacOSX)
|
||||
|
||||
License:
|
||||
|
||||
This program is free software. It comes without any warranty, to
|
||||
the extent permitted by applicable law. You can redistribute it
|
||||
and/or modify it under the terms of the Do What The Fuck You Want
|
||||
To Public License, Version 2, as published by Sam Hocevar. See
|
||||
http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
*/
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <string.h>
|
||||
#include "GLAPIPrivate.h"
|
||||
|
||||
/* Path to libGL by default */
|
||||
#define LIBGL_PATH "/System/Library/Frameworks/OpenGL.framework/libGL.dylib"
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void* openLibGL(const char* path)
|
||||
{
|
||||
return dlopen(path, RTLD_GLOBAL | RTLD_NOW);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void closeLibGL(void* libGL)
|
||||
{
|
||||
dlclose(libGL);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
int getResolver(void* oglLib, GLAPIResolver* res)
|
||||
{
|
||||
res->privateFields[0] = oglLib;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
const char* defaultLibGLName()
|
||||
{
|
||||
return LIBGL_PATH;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void* resolveGLSymbol(const GLAPIResolver* res, const char* name)
|
||||
{
|
||||
return dlsym(res->privateFields[0], name);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
77
libsst-glapi/SST_GLAPIResolve_POSIX.c
Normal file
77
libsst-glapi/SST_GLAPIResolve_POSIX.c
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
SST_GLAPIResolve_Xlib.c
|
||||
Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
Created: 12/12/2012
|
||||
|
||||
Purpose:
|
||||
|
||||
Runtime OpenGL symbol resolution (Xlib)
|
||||
|
||||
License:
|
||||
|
||||
This program is free software. It comes without any warranty, to
|
||||
the extent permitted by applicable law. You can redistribute it
|
||||
and/or modify it under the terms of the Do What The Fuck You Want
|
||||
To Public License, Version 2, as published by Sam Hocevar. See
|
||||
http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
*/
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <string.h>
|
||||
#include "GLAPIPrivate.h"
|
||||
|
||||
typedef void* (*pf_glXGetProcAddressARB)(const char* symbol);
|
||||
|
||||
typedef struct GLAPIResolver_Xlib
|
||||
{
|
||||
pf_glXGetProcAddressARB pglXGetProcAddressARB;
|
||||
} GLAPIResolver_Xlib;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void* openLibGL(const char* path)
|
||||
{
|
||||
return dlopen(path, RTLD_GLOBAL | RTLD_NOW);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void closeLibGL(void* libGL)
|
||||
{
|
||||
dlclose(libGL);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
int getResolver(void* oglLib, GLAPIResolver* res)
|
||||
{
|
||||
GLAPIResolver_Xlib* resolver = (GLAPIResolver_Xlib*)res;
|
||||
|
||||
resolver->pglXGetProcAddressARB = (pf_glXGetProcAddressARB)dlsym(oglLib, "glXGetProcAddressARB");
|
||||
|
||||
/* The -ARB variant doesn't exist? Try without */
|
||||
if(resolver->pglXGetProcAddressARB == NULL)
|
||||
resolver->pglXGetProcAddressARB = (pf_glXGetProcAddressARB)dlsym(oglLib, "glXGetProcAddress");
|
||||
|
||||
return (resolver->pglXGetProcAddressARB != NULL);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
const char* defaultLibGLName()
|
||||
{
|
||||
return "libGL.so.1";
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void* resolveGLSymbol(const GLAPIResolver* res, const char* name)
|
||||
{
|
||||
const GLAPIResolver_Xlib* resolver = (const GLAPIResolver_Xlib*)res;
|
||||
|
||||
return resolver->pglXGetProcAddressARB(name);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
83
libsst-glapi/SST_GLAPIResolve_Win32.c
Normal file
83
libsst-glapi/SST_GLAPIResolve_Win32.c
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
SST_GLAPIResolve_Win32.c
|
||||
Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
Created: 12/12/2012
|
||||
|
||||
Purpose:
|
||||
|
||||
Runtime OpenGL symbol resolution (Win32)
|
||||
|
||||
License:
|
||||
|
||||
This program is free software. It comes without any warranty, to
|
||||
the extent permitted by applicable law. You can redistribute it
|
||||
and/or modify it under the terms of the Do What The Fuck You Want
|
||||
To Public License, Version 2, as published by Sam Hocevar. See
|
||||
http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include "GLAPIPrivate.h"
|
||||
|
||||
typedef void* (WINAPI*pf_wglGetProcAddress)(const char* symbol);
|
||||
|
||||
typedef struct GLAPIResolver_Win32
|
||||
{
|
||||
pf_wglGetProcAddress pwglGetProcAddress;
|
||||
HMODULE hDLL;
|
||||
} GLAPIResolver_Win32;
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
void* openLibGL(const char* path)
|
||||
{
|
||||
return (void*)LoadLibraryA(path);
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
void closeLibGL(void* libGL)
|
||||
{
|
||||
FreeLibrary((HMODULE)libGL);
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
int getResolver(void* oglLib, GLAPIResolver* res)
|
||||
{
|
||||
HMODULE hDLL = (HMODULE)oglLib;
|
||||
GLAPIResolver_Win32* resolver = (GLAPIResolver_Win32*)res;
|
||||
|
||||
resolver->pwglGetProcAddress = (pf_wglGetProcAddress)GetProcAddress(hDLL, "wglGetProcAddress");
|
||||
resolver->hDLL = hDLL;
|
||||
|
||||
return (resolver->pwglGetProcAddress != NULL);
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Return default OpenGL library name for platform */
|
||||
const char* defaultLibGLName()
|
||||
{
|
||||
return "opengl32.dll";
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
void* resolveGLSymbol(const GLAPIResolver* res, const char* name)
|
||||
{
|
||||
void* sym;
|
||||
const GLAPIResolver_Win32* resolver = (const GLAPIResolver_Win32*)res;
|
||||
|
||||
/* Try core (GL 1.1) symbol resolution first */
|
||||
sym = (void*)GetProcAddress(resolver->hDLL, name);
|
||||
|
||||
/* If that fails, try wglGetProcAddress() for extension GL stuff */
|
||||
if(sym == NULL)
|
||||
sym = resolver->pwglGetProcAddress(name);
|
||||
|
||||
return sym;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
335
libsst-glapi/SST_GLAPIStruct.c
Normal file
335
libsst-glapi/SST_GLAPIStruct.c
Normal file
@@ -0,0 +1,335 @@
|
||||
/* AUTOGENERATED BY parsegl.c -- DO NOT MODIFY */
|
||||
#include <SST/SST_GLAPIStruct.h>
|
||||
#include "GLAPIPrivate.h"
|
||||
|
||||
void resolveGLAPI(const GLAPIResolver* resolver, struct SST_GLAPI* api)
|
||||
{
|
||||
api->ActiveTexture = resolveGLSymbol(resolver, "glActiveTexture");
|
||||
api->AttachShader = resolveGLSymbol(resolver, "glAttachShader");
|
||||
api->BeginConditionalRender = resolveGLSymbol(resolver, "glBeginConditionalRender");
|
||||
api->BeginQuery = resolveGLSymbol(resolver, "glBeginQuery");
|
||||
api->BeginTransformFeedback = resolveGLSymbol(resolver, "glBeginTransformFeedback");
|
||||
api->BindAttribLocation = resolveGLSymbol(resolver, "glBindAttribLocation");
|
||||
api->BindBuffer = resolveGLSymbol(resolver, "glBindBuffer");
|
||||
api->BindBufferBase = resolveGLSymbol(resolver, "glBindBufferBase");
|
||||
api->BindBufferRange = resolveGLSymbol(resolver, "glBindBufferRange");
|
||||
api->BindFragDataLocation = resolveGLSymbol(resolver, "glBindFragDataLocation");
|
||||
api->BindFragDataLocationIndexed = resolveGLSymbol(resolver, "glBindFragDataLocationIndexed");
|
||||
api->BindFramebuffer = resolveGLSymbol(resolver, "glBindFramebuffer");
|
||||
api->BindRenderbuffer = resolveGLSymbol(resolver, "glBindRenderbuffer");
|
||||
api->BindSampler = resolveGLSymbol(resolver, "glBindSampler");
|
||||
api->BindTexture = resolveGLSymbol(resolver, "glBindTexture");
|
||||
api->BindVertexArray = resolveGLSymbol(resolver, "glBindVertexArray");
|
||||
api->BlendColor = resolveGLSymbol(resolver, "glBlendColor");
|
||||
api->BlendEquation = resolveGLSymbol(resolver, "glBlendEquation");
|
||||
api->BlendEquationSeparate = resolveGLSymbol(resolver, "glBlendEquationSeparate");
|
||||
api->BlendFunc = resolveGLSymbol(resolver, "glBlendFunc");
|
||||
api->BlendFuncSeparate = resolveGLSymbol(resolver, "glBlendFuncSeparate");
|
||||
api->BlitFramebuffer = resolveGLSymbol(resolver, "glBlitFramebuffer");
|
||||
api->BufferData = resolveGLSymbol(resolver, "glBufferData");
|
||||
api->BufferSubData = resolveGLSymbol(resolver, "glBufferSubData");
|
||||
api->CheckFramebufferStatus = resolveGLSymbol(resolver, "glCheckFramebufferStatus");
|
||||
api->ClampColor = resolveGLSymbol(resolver, "glClampColor");
|
||||
api->Clear = resolveGLSymbol(resolver, "glClear");
|
||||
api->ClearBufferiv = resolveGLSymbol(resolver, "glClearBufferiv");
|
||||
api->ClearBufferuiv = resolveGLSymbol(resolver, "glClearBufferuiv");
|
||||
api->ClearBufferfv = resolveGLSymbol(resolver, "glClearBufferfv");
|
||||
api->ClearBufferfi = resolveGLSymbol(resolver, "glClearBufferfi");
|
||||
api->ClearColor = resolveGLSymbol(resolver, "glClearColor");
|
||||
api->ClearDepth = resolveGLSymbol(resolver, "glClearDepth");
|
||||
api->ClearStencil = resolveGLSymbol(resolver, "glClearStencil");
|
||||
api->ClientWaitSync = resolveGLSymbol(resolver, "glClientWaitSync");
|
||||
api->ColorMask = resolveGLSymbol(resolver, "glColorMask");
|
||||
api->ColorMaski = resolveGLSymbol(resolver, "glColorMaski");
|
||||
api->CompileShader = resolveGLSymbol(resolver, "glCompileShader");
|
||||
api->CompressedTexImage1D = resolveGLSymbol(resolver, "glCompressedTexImage1D");
|
||||
api->CompressedTexImage2D = resolveGLSymbol(resolver, "glCompressedTexImage2D");
|
||||
api->CompressedTexImage3D = resolveGLSymbol(resolver, "glCompressedTexImage3D");
|
||||
api->CompressedTexSubImage1D = resolveGLSymbol(resolver, "glCompressedTexSubImage1D");
|
||||
api->CompressedTexSubImage2D = resolveGLSymbol(resolver, "glCompressedTexSubImage2D");
|
||||
api->CompressedTexSubImage3D = resolveGLSymbol(resolver, "glCompressedTexSubImage3D");
|
||||
api->CopyBufferSubData = resolveGLSymbol(resolver, "glCopyBufferSubData");
|
||||
api->CopyTexImage1D = resolveGLSymbol(resolver, "glCopyTexImage1D");
|
||||
api->CopyTexImage2D = resolveGLSymbol(resolver, "glCopyTexImage2D");
|
||||
api->CopyTexSubImage1D = resolveGLSymbol(resolver, "glCopyTexSubImage1D");
|
||||
api->CopyTexSubImage2D = resolveGLSymbol(resolver, "glCopyTexSubImage2D");
|
||||
api->CopyTexSubImage3D = resolveGLSymbol(resolver, "glCopyTexSubImage3D");
|
||||
api->CreateProgram = resolveGLSymbol(resolver, "glCreateProgram");
|
||||
api->CreateShader = resolveGLSymbol(resolver, "glCreateShader");
|
||||
api->CullFace = resolveGLSymbol(resolver, "glCullFace");
|
||||
api->DeleteBuffers = resolveGLSymbol(resolver, "glDeleteBuffers");
|
||||
api->DeleteFramebuffers = resolveGLSymbol(resolver, "glDeleteFramebuffers");
|
||||
api->DeleteProgram = resolveGLSymbol(resolver, "glDeleteProgram");
|
||||
api->DeleteQueries = resolveGLSymbol(resolver, "glDeleteQueries");
|
||||
api->DeleteRenderbuffers = resolveGLSymbol(resolver, "glDeleteRenderbuffers");
|
||||
api->DeleteSamplers = resolveGLSymbol(resolver, "glDeleteSamplers");
|
||||
api->DeleteShader = resolveGLSymbol(resolver, "glDeleteShader");
|
||||
api->DeleteSync = resolveGLSymbol(resolver, "glDeleteSync");
|
||||
api->DeleteTextures = resolveGLSymbol(resolver, "glDeleteTextures");
|
||||
api->DeleteVertexArrays = resolveGLSymbol(resolver, "glDeleteVertexArrays");
|
||||
api->DepthFunc = resolveGLSymbol(resolver, "glDepthFunc");
|
||||
api->DepthMask = resolveGLSymbol(resolver, "glDepthMask");
|
||||
api->DepthRange = resolveGLSymbol(resolver, "glDepthRange");
|
||||
api->DetachShader = resolveGLSymbol(resolver, "glDetachShader");
|
||||
api->Disable = resolveGLSymbol(resolver, "glDisable");
|
||||
api->DisableVertexAttribArray = resolveGLSymbol(resolver, "glDisableVertexAttribArray");
|
||||
api->Disablei = resolveGLSymbol(resolver, "glDisablei");
|
||||
api->DrawArrays = resolveGLSymbol(resolver, "glDrawArrays");
|
||||
api->DrawArraysInstanced = resolveGLSymbol(resolver, "glDrawArraysInstanced");
|
||||
api->DrawBuffer = resolveGLSymbol(resolver, "glDrawBuffer");
|
||||
api->DrawBuffers = resolveGLSymbol(resolver, "glDrawBuffers");
|
||||
api->DrawElements = resolveGLSymbol(resolver, "glDrawElements");
|
||||
api->DrawElementsBaseVertex = resolveGLSymbol(resolver, "glDrawElementsBaseVertex");
|
||||
api->DrawElementsInstanced = resolveGLSymbol(resolver, "glDrawElementsInstanced");
|
||||
api->DrawElementsInstancedBaseVertex = resolveGLSymbol(resolver, "glDrawElementsInstancedBaseVertex");
|
||||
api->DrawRangeElements = resolveGLSymbol(resolver, "glDrawRangeElements");
|
||||
api->DrawRangeElementsBaseVertex = resolveGLSymbol(resolver, "glDrawRangeElementsBaseVertex");
|
||||
api->Enable = resolveGLSymbol(resolver, "glEnable");
|
||||
api->EnableVertexAttribArray = resolveGLSymbol(resolver, "glEnableVertexAttribArray");
|
||||
api->Enablei = resolveGLSymbol(resolver, "glEnablei");
|
||||
api->EndQuery = resolveGLSymbol(resolver, "glEndQuery");
|
||||
api->EndTransformFeedback = resolveGLSymbol(resolver, "glEndTransformFeedback");
|
||||
api->FenceSync = resolveGLSymbol(resolver, "glFenceSync");
|
||||
api->Finish = resolveGLSymbol(resolver, "glFinish");
|
||||
api->Flush = resolveGLSymbol(resolver, "glFlush");
|
||||
api->FlushMappedBufferRange = resolveGLSymbol(resolver, "glFlushMappedBufferRange");
|
||||
api->FramebufferRenderbuffer = resolveGLSymbol(resolver, "glFramebufferRenderbuffer");
|
||||
api->FramebufferTexture = resolveGLSymbol(resolver, "glFramebufferTexture");
|
||||
api->FramebufferTexture1D = resolveGLSymbol(resolver, "glFramebufferTexture1D");
|
||||
api->FramebufferTexture2D = resolveGLSymbol(resolver, "glFramebufferTexture2D");
|
||||
api->FramebufferTexture3D = resolveGLSymbol(resolver, "glFramebufferTexture3D");
|
||||
api->FramebufferTextureLayer = resolveGLSymbol(resolver, "glFramebufferTextureLayer");
|
||||
api->FrontFace = resolveGLSymbol(resolver, "glFrontFace");
|
||||
api->GenBuffers = resolveGLSymbol(resolver, "glGenBuffers");
|
||||
api->GenFramebuffers = resolveGLSymbol(resolver, "glGenFramebuffers");
|
||||
api->GenQueries = resolveGLSymbol(resolver, "glGenQueries");
|
||||
api->GenRenderbuffers = resolveGLSymbol(resolver, "glGenRenderbuffers");
|
||||
api->GenSamplers = resolveGLSymbol(resolver, "glGenSamplers");
|
||||
api->GenTextures = resolveGLSymbol(resolver, "glGenTextures");
|
||||
api->GenVertexArrays = resolveGLSymbol(resolver, "glGenVertexArrays");
|
||||
api->GenerateMipmap = resolveGLSymbol(resolver, "glGenerateMipmap");
|
||||
api->GetBooleanv = resolveGLSymbol(resolver, "glGetBooleanv");
|
||||
api->GetDoublev = resolveGLSymbol(resolver, "glGetDoublev");
|
||||
api->GetFloatv = resolveGLSymbol(resolver, "glGetFloatv");
|
||||
api->GetIntegerv = resolveGLSymbol(resolver, "glGetIntegerv");
|
||||
api->GetInteger64v = resolveGLSymbol(resolver, "glGetInteger64v");
|
||||
api->GetActiveAttrib = resolveGLSymbol(resolver, "glGetActiveAttrib");
|
||||
api->GetActiveUniform = resolveGLSymbol(resolver, "glGetActiveUniform");
|
||||
api->GetActiveUniformBlockiv = resolveGLSymbol(resolver, "glGetActiveUniformBlockiv");
|
||||
api->GetActiveUniformBlockName = resolveGLSymbol(resolver, "glGetActiveUniformBlockName");
|
||||
api->GetActiveUniformName = resolveGLSymbol(resolver, "glGetActiveUniformName");
|
||||
api->GetActiveUniformsiv = resolveGLSymbol(resolver, "glGetActiveUniformsiv");
|
||||
api->GetAttachedShaders = resolveGLSymbol(resolver, "glGetAttachedShaders");
|
||||
api->GetAttribLocation = resolveGLSymbol(resolver, "glGetAttribLocation");
|
||||
api->GetBufferParameteriv = resolveGLSymbol(resolver, "glGetBufferParameteriv");
|
||||
api->GetBufferPointerv = resolveGLSymbol(resolver, "glGetBufferPointerv");
|
||||
api->GetBufferSubData = resolveGLSymbol(resolver, "glGetBufferSubData");
|
||||
api->GetCompressedTexImage = resolveGLSymbol(resolver, "glGetCompressedTexImage");
|
||||
api->GetError = resolveGLSymbol(resolver, "glGetError");
|
||||
api->GetFragDataIndex = resolveGLSymbol(resolver, "glGetFragDataIndex");
|
||||
api->GetFragDataLocation = resolveGLSymbol(resolver, "glGetFragDataLocation");
|
||||
api->GetFramebufferAttachmentParameteriv = resolveGLSymbol(resolver, "glGetFramebufferAttachmentParameteriv");
|
||||
api->GetMultisamplefv = resolveGLSymbol(resolver, "glGetMultisamplefv");
|
||||
api->GetProgramiv = resolveGLSymbol(resolver, "glGetProgramiv");
|
||||
api->GetProgramInfoLog = resolveGLSymbol(resolver, "glGetProgramInfoLog");
|
||||
api->GetQueryObjectiv = resolveGLSymbol(resolver, "glGetQueryObjectiv");
|
||||
api->GetQueryObjectuiv = resolveGLSymbol(resolver, "glGetQueryObjectuiv");
|
||||
api->GetQueryObjecti64v = resolveGLSymbol(resolver, "glGetQueryObjecti64v");
|
||||
api->GetQueryObjectui64v = resolveGLSymbol(resolver, "glGetQueryObjectui64v");
|
||||
api->GetQueryiv = resolveGLSymbol(resolver, "glGetQueryiv");
|
||||
api->GetRenderbufferParameteriv = resolveGLSymbol(resolver, "glGetRenderbufferParameteriv");
|
||||
api->GetSamplerParameterfv = resolveGLSymbol(resolver, "glGetSamplerParameterfv");
|
||||
api->GetSamplerParameteriv = resolveGLSymbol(resolver, "glGetSamplerParameteriv");
|
||||
api->GetShaderiv = resolveGLSymbol(resolver, "glGetShaderiv");
|
||||
api->GetShaderInfoLog = resolveGLSymbol(resolver, "glGetShaderInfoLog");
|
||||
api->GetShaderSource = resolveGLSymbol(resolver, "glGetShaderSource");
|
||||
api->GetString = resolveGLSymbol(resolver, "glGetString");
|
||||
api->GetStringi = resolveGLSymbol(resolver, "glGetStringi");
|
||||
api->GetSynciv = resolveGLSymbol(resolver, "glGetSynciv");
|
||||
api->GetTexImage = resolveGLSymbol(resolver, "glGetTexImage");
|
||||
api->GetTexLevelParameterfv = resolveGLSymbol(resolver, "glGetTexLevelParameterfv");
|
||||
api->GetTexLevelParameteriv = resolveGLSymbol(resolver, "glGetTexLevelParameteriv");
|
||||
api->GetTexParameterfv = resolveGLSymbol(resolver, "glGetTexParameterfv");
|
||||
api->GetTexParameteriv = resolveGLSymbol(resolver, "glGetTexParameteriv");
|
||||
api->GetTransformFeedbackVarying = resolveGLSymbol(resolver, "glGetTransformFeedbackVarying");
|
||||
api->GetUniformfv = resolveGLSymbol(resolver, "glGetUniformfv");
|
||||
api->GetUniformiv = resolveGLSymbol(resolver, "glGetUniformiv");
|
||||
api->GetUniformIndices = resolveGLSymbol(resolver, "glGetUniformIndices");
|
||||
api->GetUniformLocation = resolveGLSymbol(resolver, "glGetUniformLocation");
|
||||
api->GetVertexAttribdv = resolveGLSymbol(resolver, "glGetVertexAttribdv");
|
||||
api->GetVertexAttribfv = resolveGLSymbol(resolver, "glGetVertexAttribfv");
|
||||
api->GetVertexAttribiv = resolveGLSymbol(resolver, "glGetVertexAttribiv");
|
||||
api->GetVertexAttribIiv = resolveGLSymbol(resolver, "glGetVertexAttribIiv");
|
||||
api->GetVertexAttribIuiv = resolveGLSymbol(resolver, "glGetVertexAttribIuiv");
|
||||
api->GetVertexAttribPointerv = resolveGLSymbol(resolver, "glGetVertexAttribPointerv");
|
||||
api->Hint = resolveGLSymbol(resolver, "glHint");
|
||||
api->IsBuffer = resolveGLSymbol(resolver, "glIsBuffer");
|
||||
api->IsEnabled = resolveGLSymbol(resolver, "glIsEnabled");
|
||||
api->IsEnabledi = resolveGLSymbol(resolver, "glIsEnabledi");
|
||||
api->IsFramebuffer = resolveGLSymbol(resolver, "glIsFramebuffer");
|
||||
api->IsProgram = resolveGLSymbol(resolver, "glIsProgram");
|
||||
api->IsQuery = resolveGLSymbol(resolver, "glIsQuery");
|
||||
api->IsRenderbuffer = resolveGLSymbol(resolver, "glIsRenderbuffer");
|
||||
api->IsSampler = resolveGLSymbol(resolver, "glIsSampler");
|
||||
api->IsShader = resolveGLSymbol(resolver, "glIsShader");
|
||||
api->IsSync = resolveGLSymbol(resolver, "glIsSync");
|
||||
api->IsTexture = resolveGLSymbol(resolver, "glIsTexture");
|
||||
api->IsVertexArray = resolveGLSymbol(resolver, "glIsVertexArray");
|
||||
api->LineWidth = resolveGLSymbol(resolver, "glLineWidth");
|
||||
api->LinkProgram = resolveGLSymbol(resolver, "glLinkProgram");
|
||||
api->LogicOp = resolveGLSymbol(resolver, "glLogicOp");
|
||||
api->MapBuffer = resolveGLSymbol(resolver, "glMapBuffer");
|
||||
api->MapBufferRange = resolveGLSymbol(resolver, "glMapBufferRange");
|
||||
api->MultiDrawArrays = resolveGLSymbol(resolver, "glMultiDrawArrays");
|
||||
api->MultiDrawElements = resolveGLSymbol(resolver, "glMultiDrawElements");
|
||||
api->MultiDrawElementsBaseVertex = resolveGLSymbol(resolver, "glMultiDrawElementsBaseVertex");
|
||||
api->PixelStoref = resolveGLSymbol(resolver, "glPixelStoref");
|
||||
api->PixelStorei = resolveGLSymbol(resolver, "glPixelStorei");
|
||||
api->PointParameterf = resolveGLSymbol(resolver, "glPointParameterf");
|
||||
api->PointParameteri = resolveGLSymbol(resolver, "glPointParameteri");
|
||||
api->PointSize = resolveGLSymbol(resolver, "glPointSize");
|
||||
api->PolygonMode = resolveGLSymbol(resolver, "glPolygonMode");
|
||||
api->PolygonOffset = resolveGLSymbol(resolver, "glPolygonOffset");
|
||||
api->PrimitiveRestartIndex = resolveGLSymbol(resolver, "glPrimitiveRestartIndex");
|
||||
api->ProvokingVertex = resolveGLSymbol(resolver, "glProvokingVertex");
|
||||
api->QueryCounter = resolveGLSymbol(resolver, "glQueryCounter");
|
||||
api->ReadBuffer = resolveGLSymbol(resolver, "glReadBuffer");
|
||||
api->ReadPixels = resolveGLSymbol(resolver, "glReadPixels");
|
||||
api->RenderbufferStorage = resolveGLSymbol(resolver, "glRenderbufferStorage");
|
||||
api->RenderbufferStorageMultisample = resolveGLSymbol(resolver, "glRenderbufferStorageMultisample");
|
||||
api->SampleCoverage = resolveGLSymbol(resolver, "glSampleCoverage");
|
||||
api->SampleMaski = resolveGLSymbol(resolver, "glSampleMaski");
|
||||
api->SamplerParameterf = resolveGLSymbol(resolver, "glSamplerParameterf");
|
||||
api->SamplerParameteri = resolveGLSymbol(resolver, "glSamplerParameteri");
|
||||
api->SamplerParameterfv = resolveGLSymbol(resolver, "glSamplerParameterfv");
|
||||
api->SamplerParameteriv = resolveGLSymbol(resolver, "glSamplerParameteriv");
|
||||
api->SamplerParameterIiv = resolveGLSymbol(resolver, "glSamplerParameterIiv");
|
||||
api->SamplerParameterIuiv = resolveGLSymbol(resolver, "glSamplerParameterIuiv");
|
||||
api->Scissor = resolveGLSymbol(resolver, "glScissor");
|
||||
api->ShaderSource = resolveGLSymbol(resolver, "glShaderSource");
|
||||
api->StencilFunc = resolveGLSymbol(resolver, "glStencilFunc");
|
||||
api->StencilFuncSeparate = resolveGLSymbol(resolver, "glStencilFuncSeparate");
|
||||
api->StencilMask = resolveGLSymbol(resolver, "glStencilMask");
|
||||
api->StencilMaskSeparate = resolveGLSymbol(resolver, "glStencilMaskSeparate");
|
||||
api->StencilOp = resolveGLSymbol(resolver, "glStencilOp");
|
||||
api->StencilOpSeparate = resolveGLSymbol(resolver, "glStencilOpSeparate");
|
||||
api->TexBuffer = resolveGLSymbol(resolver, "glTexBuffer");
|
||||
api->TexImage1D = resolveGLSymbol(resolver, "glTexImage1D");
|
||||
api->TexImage2D = resolveGLSymbol(resolver, "glTexImage2D");
|
||||
api->TexImage2DMultisample = resolveGLSymbol(resolver, "glTexImage2DMultisample");
|
||||
api->TexImage3D = resolveGLSymbol(resolver, "glTexImage3D");
|
||||
api->TexImage3DMultisample = resolveGLSymbol(resolver, "glTexImage3DMultisample");
|
||||
api->TexParameterf = resolveGLSymbol(resolver, "glTexParameterf");
|
||||
api->TexParameteri = resolveGLSymbol(resolver, "glTexParameteri");
|
||||
api->TexParameterfv = resolveGLSymbol(resolver, "glTexParameterfv");
|
||||
api->TexParameteriv = resolveGLSymbol(resolver, "glTexParameteriv");
|
||||
api->TexParameterIiv = resolveGLSymbol(resolver, "glTexParameterIiv");
|
||||
api->TexParameterIuiv = resolveGLSymbol(resolver, "glTexParameterIuiv");
|
||||
api->TexSubImage1D = resolveGLSymbol(resolver, "glTexSubImage1D");
|
||||
api->TexSubImage2D = resolveGLSymbol(resolver, "glTexSubImage2D");
|
||||
api->TexSubImage3D = resolveGLSymbol(resolver, "glTexSubImage3D");
|
||||
api->TransformFeedbackVaryings = resolveGLSymbol(resolver, "glTransformFeedbackVaryings");
|
||||
api->Uniform1f = resolveGLSymbol(resolver, "glUniform1f");
|
||||
api->Uniform2f = resolveGLSymbol(resolver, "glUniform2f");
|
||||
api->Uniform3f = resolveGLSymbol(resolver, "glUniform3f");
|
||||
api->Uniform4f = resolveGLSymbol(resolver, "glUniform4f");
|
||||
api->Uniform1i = resolveGLSymbol(resolver, "glUniform1i");
|
||||
api->Uniform2i = resolveGLSymbol(resolver, "glUniform2i");
|
||||
api->Uniform3i = resolveGLSymbol(resolver, "glUniform3i");
|
||||
api->Uniform4i = resolveGLSymbol(resolver, "glUniform4i");
|
||||
api->Uniform1ui = resolveGLSymbol(resolver, "glUniform1ui");
|
||||
api->Uniform2ui = resolveGLSymbol(resolver, "glUniform2ui");
|
||||
api->Uniform3ui = resolveGLSymbol(resolver, "glUniform3ui");
|
||||
api->Uniform4ui = resolveGLSymbol(resolver, "glUniform4ui");
|
||||
api->Uniform1fv = resolveGLSymbol(resolver, "glUniform1fv");
|
||||
api->Uniform2fv = resolveGLSymbol(resolver, "glUniform2fv");
|
||||
api->Uniform3fv = resolveGLSymbol(resolver, "glUniform3fv");
|
||||
api->Uniform4fv = resolveGLSymbol(resolver, "glUniform4fv");
|
||||
api->Uniform1iv = resolveGLSymbol(resolver, "glUniform1iv");
|
||||
api->Uniform2iv = resolveGLSymbol(resolver, "glUniform2iv");
|
||||
api->Uniform3iv = resolveGLSymbol(resolver, "glUniform3iv");
|
||||
api->Uniform4iv = resolveGLSymbol(resolver, "glUniform4iv");
|
||||
api->Uniform1uiv = resolveGLSymbol(resolver, "glUniform1uiv");
|
||||
api->Uniform2uiv = resolveGLSymbol(resolver, "glUniform2uiv");
|
||||
api->Uniform3uiv = resolveGLSymbol(resolver, "glUniform3uiv");
|
||||
api->Uniform4uiv = resolveGLSymbol(resolver, "glUniform4uiv");
|
||||
api->UniformMatrix2fv = resolveGLSymbol(resolver, "glUniformMatrix2fv");
|
||||
api->UniformMatrix3fv = resolveGLSymbol(resolver, "glUniformMatrix3fv");
|
||||
api->UniformMatrix4fv = resolveGLSymbol(resolver, "glUniformMatrix4fv");
|
||||
api->UniformMatrix2x3fv = resolveGLSymbol(resolver, "glUniformMatrix2x3fv");
|
||||
api->UniformMatrix3x2fv = resolveGLSymbol(resolver, "glUniformMatrix3x2fv");
|
||||
api->UniformMatrix2x4fv = resolveGLSymbol(resolver, "glUniformMatrix2x4fv");
|
||||
api->UniformMatrix4x2fv = resolveGLSymbol(resolver, "glUniformMatrix4x2fv");
|
||||
api->UniformMatrix3x4fv = resolveGLSymbol(resolver, "glUniformMatrix3x4fv");
|
||||
api->UniformMatrix4x3fv = resolveGLSymbol(resolver, "glUniformMatrix4x3fv");
|
||||
api->UniformBlockBinding = resolveGLSymbol(resolver, "glUniformBlockBinding");
|
||||
api->UnmapBuffer = resolveGLSymbol(resolver, "glUnmapBuffer");
|
||||
api->UseProgram = resolveGLSymbol(resolver, "glUseProgram");
|
||||
api->ValidateProgram = resolveGLSymbol(resolver, "glValidateProgram");
|
||||
api->VertexAttrib1f = resolveGLSymbol(resolver, "glVertexAttrib1f");
|
||||
api->VertexAttrib1s = resolveGLSymbol(resolver, "glVertexAttrib1s");
|
||||
api->VertexAttrib1d = resolveGLSymbol(resolver, "glVertexAttrib1d");
|
||||
api->VertexAttribI1i = resolveGLSymbol(resolver, "glVertexAttribI1i");
|
||||
api->VertexAttribI1ui = resolveGLSymbol(resolver, "glVertexAttribI1ui");
|
||||
api->VertexAttrib2f = resolveGLSymbol(resolver, "glVertexAttrib2f");
|
||||
api->VertexAttrib2s = resolveGLSymbol(resolver, "glVertexAttrib2s");
|
||||
api->VertexAttrib2d = resolveGLSymbol(resolver, "glVertexAttrib2d");
|
||||
api->VertexAttribI2i = resolveGLSymbol(resolver, "glVertexAttribI2i");
|
||||
api->VertexAttribI2ui = resolveGLSymbol(resolver, "glVertexAttribI2ui");
|
||||
api->VertexAttrib3f = resolveGLSymbol(resolver, "glVertexAttrib3f");
|
||||
api->VertexAttrib3s = resolveGLSymbol(resolver, "glVertexAttrib3s");
|
||||
api->VertexAttrib3d = resolveGLSymbol(resolver, "glVertexAttrib3d");
|
||||
api->VertexAttribI3i = resolveGLSymbol(resolver, "glVertexAttribI3i");
|
||||
api->VertexAttribI3ui = resolveGLSymbol(resolver, "glVertexAttribI3ui");
|
||||
api->VertexAttrib4f = resolveGLSymbol(resolver, "glVertexAttrib4f");
|
||||
api->VertexAttrib4s = resolveGLSymbol(resolver, "glVertexAttrib4s");
|
||||
api->VertexAttrib4d = resolveGLSymbol(resolver, "glVertexAttrib4d");
|
||||
api->VertexAttrib4Nub = resolveGLSymbol(resolver, "glVertexAttrib4Nub");
|
||||
api->VertexAttribI4i = resolveGLSymbol(resolver, "glVertexAttribI4i");
|
||||
api->VertexAttribI4ui = resolveGLSymbol(resolver, "glVertexAttribI4ui");
|
||||
api->VertexAttrib1fv = resolveGLSymbol(resolver, "glVertexAttrib1fv");
|
||||
api->VertexAttrib1sv = resolveGLSymbol(resolver, "glVertexAttrib1sv");
|
||||
api->VertexAttrib1dv = resolveGLSymbol(resolver, "glVertexAttrib1dv");
|
||||
api->VertexAttribI1iv = resolveGLSymbol(resolver, "glVertexAttribI1iv");
|
||||
api->VertexAttribI1uiv = resolveGLSymbol(resolver, "glVertexAttribI1uiv");
|
||||
api->VertexAttrib2fv = resolveGLSymbol(resolver, "glVertexAttrib2fv");
|
||||
api->VertexAttrib2sv = resolveGLSymbol(resolver, "glVertexAttrib2sv");
|
||||
api->VertexAttrib2dv = resolveGLSymbol(resolver, "glVertexAttrib2dv");
|
||||
api->VertexAttribI2iv = resolveGLSymbol(resolver, "glVertexAttribI2iv");
|
||||
api->VertexAttribI2uiv = resolveGLSymbol(resolver, "glVertexAttribI2uiv");
|
||||
api->VertexAttrib3fv = resolveGLSymbol(resolver, "glVertexAttrib3fv");
|
||||
api->VertexAttrib3sv = resolveGLSymbol(resolver, "glVertexAttrib3sv");
|
||||
api->VertexAttrib3dv = resolveGLSymbol(resolver, "glVertexAttrib3dv");
|
||||
api->VertexAttribI3iv = resolveGLSymbol(resolver, "glVertexAttribI3iv");
|
||||
api->VertexAttribI3uiv = resolveGLSymbol(resolver, "glVertexAttribI3uiv");
|
||||
api->VertexAttrib4fv = resolveGLSymbol(resolver, "glVertexAttrib4fv");
|
||||
api->VertexAttrib4sv = resolveGLSymbol(resolver, "glVertexAttrib4sv");
|
||||
api->VertexAttrib4dv = resolveGLSymbol(resolver, "glVertexAttrib4dv");
|
||||
api->VertexAttrib4iv = resolveGLSymbol(resolver, "glVertexAttrib4iv");
|
||||
api->VertexAttrib4bv = resolveGLSymbol(resolver, "glVertexAttrib4bv");
|
||||
api->VertexAttrib4ubv = resolveGLSymbol(resolver, "glVertexAttrib4ubv");
|
||||
api->VertexAttrib4usv = resolveGLSymbol(resolver, "glVertexAttrib4usv");
|
||||
api->VertexAttrib4uiv = resolveGLSymbol(resolver, "glVertexAttrib4uiv");
|
||||
api->VertexAttrib4Nbv = resolveGLSymbol(resolver, "glVertexAttrib4Nbv");
|
||||
api->VertexAttrib4Nsv = resolveGLSymbol(resolver, "glVertexAttrib4Nsv");
|
||||
api->VertexAttrib4Niv = resolveGLSymbol(resolver, "glVertexAttrib4Niv");
|
||||
api->VertexAttrib4Nubv = resolveGLSymbol(resolver, "glVertexAttrib4Nubv");
|
||||
api->VertexAttrib4Nusv = resolveGLSymbol(resolver, "glVertexAttrib4Nusv");
|
||||
api->VertexAttrib4Nuiv = resolveGLSymbol(resolver, "glVertexAttrib4Nuiv");
|
||||
api->VertexAttribI4bv = resolveGLSymbol(resolver, "glVertexAttribI4bv");
|
||||
api->VertexAttribI4ubv = resolveGLSymbol(resolver, "glVertexAttribI4ubv");
|
||||
api->VertexAttribI4sv = resolveGLSymbol(resolver, "glVertexAttribI4sv");
|
||||
api->VertexAttribI4usv = resolveGLSymbol(resolver, "glVertexAttribI4usv");
|
||||
api->VertexAttribI4iv = resolveGLSymbol(resolver, "glVertexAttribI4iv");
|
||||
api->VertexAttribI4uiv = resolveGLSymbol(resolver, "glVertexAttribI4uiv");
|
||||
api->VertexAttribP1ui = resolveGLSymbol(resolver, "glVertexAttribP1ui");
|
||||
api->VertexAttribP2ui = resolveGLSymbol(resolver, "glVertexAttribP2ui");
|
||||
api->VertexAttribP3ui = resolveGLSymbol(resolver, "glVertexAttribP3ui");
|
||||
api->VertexAttribP4ui = resolveGLSymbol(resolver, "glVertexAttribP4ui");
|
||||
api->VertexAttribDivisor = resolveGLSymbol(resolver, "glVertexAttribDivisor");
|
||||
api->VertexAttribPointer = resolveGLSymbol(resolver, "glVertexAttribPointer");
|
||||
api->VertexAttribIPointer = resolveGLSymbol(resolver, "glVertexAttribIPointer");
|
||||
api->Viewport = resolveGLSymbol(resolver, "glViewport");
|
||||
api->WaitSync = resolveGLSymbol(resolver, "glWaitSync");
|
||||
|
||||
}
|
||||
388
libsst-glapi/gl33.txt
Normal file
388
libsst-glapi/gl33.txt
Normal file
@@ -0,0 +1,388 @@
|
||||
// gl33.txt
|
||||
// Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
// Created: 12/12/2012
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// OpenGL 3.3 function definitions
|
||||
//
|
||||
// License:
|
||||
//
|
||||
// This program is free software. It comes without any warranty, to
|
||||
// the extent permitted by applicable law. You can redistribute it
|
||||
// and/or modify it under the terms of the Do What The Fuck You Want
|
||||
// To Public License, Version 2, as published by Sam Hocevar. See
|
||||
// http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
// --A--
|
||||
void ActiveTexture GLenum
|
||||
void AttachShader GLuint GLuint
|
||||
|
||||
// --B--
|
||||
void BeginConditionalRender GLuint GLenum
|
||||
void BeginQuery GLenum GLuint
|
||||
void BeginTransformFeedback GLenum
|
||||
void BindAttribLocation GLuint GLuint const_GLchar*
|
||||
void BindBuffer GLenum GLuint
|
||||
void BindBufferBase GLenum GLuint GLuint
|
||||
void BindBufferRange GLenum GLuint GLuint GLintptr GLsizeiptr
|
||||
void BindFragDataLocation GLuint GLuint const_GLchar*
|
||||
void BindFragDataLocationIndexed GLuint GLuint GLuint const_GLchar*
|
||||
void BindFramebuffer GLenum GLuint
|
||||
void BindRenderbuffer GLenum GLuint
|
||||
void BindSampler GLuint GLuint
|
||||
void BindTexture GLenum GLuint
|
||||
void BindVertexArray GLuint
|
||||
void BlendColor GLclampf GLclampf GLclampf GLclampf
|
||||
void BlendEquation GLenum
|
||||
void BlendEquationSeparate GLenum GLenum
|
||||
void BlendFunc GLenum GLenum
|
||||
void BlendFuncSeparate GLenum GLenum GLenum GLenum
|
||||
void BlitFramebuffer GLint GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum
|
||||
void BufferData GLenum GLsizeiptr const_GLvoid* GLenum
|
||||
void BufferSubData GLenum GLintptr GLsizeiptr const_GLvoid*
|
||||
|
||||
// --C--
|
||||
GLenum CheckFramebufferStatus GLenum
|
||||
void ClampColor GLenum GLenum
|
||||
void Clear GLbitfield
|
||||
void ClearBufferiv GLenum GLint const_GLint*
|
||||
void ClearBufferuiv GLenum GLint const_GLuint*
|
||||
void ClearBufferfv GLenum GLint const_GLfloat*
|
||||
void ClearBufferfi GLenum GLint GLfloat GLint
|
||||
void ClearColor GLclampf GLclampf GLclampf GLclampf
|
||||
void ClearDepth GLclampd
|
||||
void ClearStencil GLint
|
||||
GLenum ClientWaitSync GLsync GLbitfield GLuint64
|
||||
void ColorMask GLboolean GLboolean GLboolean GLboolean
|
||||
void ColorMaski GLuint GLboolean GLboolean GLboolean GLboolean
|
||||
void CompileShader GLuint
|
||||
void CompressedTexImage1D GLenum GLint GLenum GLsizei GLint GLsizei const_GLvoid*
|
||||
void CompressedTexImage2D GLenum GLint GLenum GLsizei GLsizei GLint GLsizei const_GLvoid*
|
||||
void CompressedTexImage3D GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const_GLvoid*
|
||||
void CompressedTexSubImage1D GLenum GLint GLint GLsizei GLenum GLsizei const_GLvoid*
|
||||
void CompressedTexSubImage2D GLenum GLint GLint GLint GLsizei GLsizei GLenum GLsizei const_GLvoid*
|
||||
void CompressedTexSubImage3D GLenum GLint GLint GLint GLint GLsizei GLsizei GLsizei GLenum GLsizei const_GLvoid*
|
||||
void CopyBufferSubData GLenum GLenum GLintptr GLintptr GLsizeiptr
|
||||
void CopyTexImage1D GLenum GLint GLenum GLint GLint GLsizei GLint
|
||||
void CopyTexImage2D GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint
|
||||
void CopyTexSubImage1D GLenum GLint GLint GLint GLint GLsizei
|
||||
void CopyTexSubImage2D GLenum GLint GLint GLint GLint GLint GLsizei GLsizei
|
||||
void CopyTexSubImage3D GLenum GLint GLint GLint GLint GLint GLint GLsizei GLsizei
|
||||
GLuint CreateProgram
|
||||
GLuint CreateShader GLenum
|
||||
void CullFace GLenum
|
||||
|
||||
// --D--
|
||||
void DeleteBuffers GLsizei const_GLuint*
|
||||
void DeleteFramebuffers GLsizei GLuint*
|
||||
void DeleteProgram GLuint
|
||||
void DeleteQueries GLsizei const_GLuint*
|
||||
void DeleteRenderbuffers GLsizei GLuint*
|
||||
void DeleteSamplers GLsizei const_GLuint*
|
||||
void DeleteShader GLuint
|
||||
void DeleteSync GLsync
|
||||
void DeleteTextures GLsizei const_GLuint*
|
||||
void DeleteVertexArrays GLsizei const_GLuint*
|
||||
void DepthFunc GLenum
|
||||
void DepthMask GLboolean
|
||||
void DepthRange GLclampd GLclampd
|
||||
void DetachShader GLuint GLuint
|
||||
void Disable GLenum
|
||||
void DisableVertexAttribArray GLuint
|
||||
void Disablei GLenum GLuint
|
||||
void DrawArrays GLenum GLint GLsizei
|
||||
void DrawArraysInstanced GLenum GLint GLsizei GLsizei
|
||||
void DrawBuffer GLenum
|
||||
void DrawBuffers GLsizei const_GLenum*
|
||||
void DrawElements GLenum GLsizei GLenum const_GLvoid*
|
||||
void DrawElementsBaseVertex GLenum GLsizei GLenum const_GLvoid* GLint
|
||||
void DrawElementsInstanced GLenum GLsizei GLenum const_GLvoid* GLsizei
|
||||
void DrawElementsInstancedBaseVertex GLenum GLsizei GLenum GLvoid* GLsizei GLint
|
||||
void DrawRangeElements GLenum GLuint GLuint GLsizei GLenum const_GLvoid*
|
||||
void DrawRangeElementsBaseVertex GLenum GLuint GLuint GLsizei GLenum GLvoid* GLint
|
||||
|
||||
// --E--
|
||||
void Enable GLenum
|
||||
void EnableVertexAttribArray GLuint
|
||||
void Enablei GLenum GLuint
|
||||
void EndQuery GLenum
|
||||
void EndTransformFeedback
|
||||
|
||||
// --F--
|
||||
GLsync FenceSync GLenum GLbitfield
|
||||
void Finish
|
||||
void Flush
|
||||
void FlushMappedBufferRange GLenum GLintptr GLsizeiptr
|
||||
void FramebufferRenderbuffer GLenum GLenum GLenum GLuint
|
||||
void FramebufferTexture GLenum GLenum GLuint GLint
|
||||
void FramebufferTexture1D GLenum GLenum GLenum GLuint GLint
|
||||
void FramebufferTexture2D GLenum GLenum GLenum GLuint GLint
|
||||
void FramebufferTexture3D GLenum GLenum GLenum GLuint GLint GLint
|
||||
void FramebufferTextureLayer GLenum GLenum GLuint GLint GLint
|
||||
void FrontFace GLenum
|
||||
|
||||
// --G--
|
||||
void GenBuffers GLsizei GLuint*
|
||||
void GenFramebuffers GLsizei GLuint*
|
||||
void GenQueries GLsizei GLuint*
|
||||
void GenRenderbuffers GLsizei GLuint*
|
||||
void GenSamplers GLsizei GLuint*
|
||||
void GenTextures GLsizei GLuint*
|
||||
void GenVertexArrays GLsizei GLuint*
|
||||
void GenerateMipmap GLenum
|
||||
void GetBooleanv GLenum GLboolean*
|
||||
void GetDoublev GLenum GLdouble*
|
||||
void GetFloatv GLenum GLfloat*
|
||||
void GetIntegerv GLenum GLint*
|
||||
void GetInteger64v GLenum GLint64*
|
||||
void GetActiveAttrib GLuint GLuint GLsizei GLsizei* GLint* GLenum* GLchar*
|
||||
void GetActiveUniform GLuint GLuint GLsizei GLsizei* GLint* GLenum* GLchar*
|
||||
void GetActiveUniformBlockiv GLuint GLuint GLenum GLint*
|
||||
void GetActiveUniformBlockName GLuint GLuint GLsizei GLsizei* GLchar*
|
||||
void GetActiveUniformName GLuint GLuint GLsizei GLsizei* GLchar*
|
||||
void GetActiveUniformsiv GLuint GLsizei const_GLuint* GLenum GLint*
|
||||
void GetAttachedShaders GLuint GLsizei GLsizei* GLuint*
|
||||
GLint GetAttribLocation GLuint const_GLchar*
|
||||
void GetBufferParameteriv GLenum GLenum GLint*
|
||||
void GetBufferPointerv GLenum GLenum GLvoid**
|
||||
void GetBufferSubData GLenum GLintptr GLsizeiptr GLvoid*
|
||||
void GetCompressedTexImage GLenum GLint GLvoid*
|
||||
GLenum GetError
|
||||
GLint GetFragDataIndex GLuint const_char*
|
||||
GLint GetFragDataLocation GLuint const_char*
|
||||
void GetFramebufferAttachmentParameteriv GLenum GLenum GLenum GLint*
|
||||
void GetMultisamplefv GLenum GLuint GLfloat*
|
||||
void GetProgramiv GLuint GLenum GLint*
|
||||
void GetProgramInfoLog GLuint GLsizei GLsizei* GLchar*
|
||||
void GetQueryObjectiv GLuint GLenum GLint*
|
||||
void GetQueryObjectuiv GLuint GLenum GLuint*
|
||||
void GetQueryObjecti64v GLuint GLenum GLint64*
|
||||
void GetQueryObjectui64v GLuint GLenum GLuint64*
|
||||
void GetQueryiv GLenum GLenum GLint*
|
||||
void GetRenderbufferParameteriv GLenum GLenum GLint*
|
||||
void GetSamplerParameterfv GLuint GLenum GLfloat*
|
||||
void GetSamplerParameteriv GLuint GLenum GLint*
|
||||
void GetShaderiv GLuint GLenum GLint*
|
||||
void GetShaderInfoLog GLuint GLsizei GLsizei* GLchar*
|
||||
void GetShaderSource GLuint GLsizei GLsizei* GLchar*
|
||||
const_GLubyte* GetString GLenum
|
||||
const_GLubyte* GetStringi GLenum GLuint
|
||||
void GetSynciv GLsync GLenum GLsizei GLsizei* GLint*
|
||||
void GetTexImage GLenum GLint GLenum GLenum GLvoid*
|
||||
void GetTexLevelParameterfv GLenum GLint GLenum GLfloat*
|
||||
void GetTexLevelParameteriv GLenum GLint GLenum GLint*
|
||||
void GetTexParameterfv GLenum GLenum GLfloat*
|
||||
void GetTexParameteriv GLenum GLenum GLint*
|
||||
void GetTransformFeedbackVarying GLuint GLuint GLsizei GLsizei* GLsizei GLenum* GLchar*
|
||||
void GetUniformfv GLuint GLint GLfloat*
|
||||
void GetUniformiv GLuint GLint GLint*
|
||||
GLuint GetUniformIndices GLuint GLsizei const_GLchar** GLuint*
|
||||
GLint GetUniformLocation GLuint const_GLchar*
|
||||
void GetVertexAttribdv GLuint GLenum GLdouble*
|
||||
void GetVertexAttribfv GLuint GLenum GLfloat*
|
||||
void GetVertexAttribiv GLuint GLenum GLint*
|
||||
void GetVertexAttribIiv GLuint GLenum GLint*
|
||||
void GetVertexAttribIuiv GLuint GLenum GLuint*
|
||||
void GetVertexAttribPointerv GLuint GLenum GLvoid**
|
||||
|
||||
// --H--
|
||||
void Hint GLenum GLenum
|
||||
|
||||
// --I--
|
||||
GLboolean IsBuffer GLuint
|
||||
GLboolean IsEnabled GLenum
|
||||
GLboolean IsEnabledi GLenum GLuint
|
||||
GLboolean IsFramebuffer GLuint
|
||||
GLboolean IsProgram GLuint
|
||||
GLboolean IsQuery GLuint
|
||||
GLboolean IsRenderbuffer GLuint
|
||||
GLboolean IsSampler GLuint
|
||||
GLboolean IsShader GLuint
|
||||
GLboolean IsSync GLsync
|
||||
GLboolean IsTexture GLuint
|
||||
GLboolean IsVertexArray GLuint
|
||||
|
||||
// --J--
|
||||
|
||||
|
||||
// --L--
|
||||
void LineWidth GLfloat
|
||||
void LinkProgram GLuint
|
||||
void LogicOp GLenum
|
||||
|
||||
// --M--
|
||||
void* MapBuffer GLenum GLenum
|
||||
void* MapBufferRange GLenum GLintptr GLsizeiptr GLbitfield
|
||||
void MultiDrawArrays GLenum const_GLint* const_GLsizei* GLsizei
|
||||
void MultiDrawElements GLenum const_GLsizei* GLenum const_GLvoid** GLsizei
|
||||
void MultiDrawElementsBaseVertex GLenum const_GLsizei* GLenum const_GLvoid** GLsizei GLint*
|
||||
|
||||
// --N--
|
||||
|
||||
// --O--
|
||||
|
||||
// --P--
|
||||
void PixelStoref GLenum GLfloat
|
||||
void PixelStorei GLenum GLint
|
||||
void PointParameterf GLenum GLfloat
|
||||
void PointParameteri GLenum GLint
|
||||
void PointSize GLfloat
|
||||
void PolygonMode GLenum GLenum
|
||||
void PolygonOffset GLfloat GLfloat
|
||||
void PrimitiveRestartIndex GLuint
|
||||
void ProvokingVertex GLenum
|
||||
|
||||
// --Q--
|
||||
void QueryCounter GLuint GLenum
|
||||
|
||||
// --R--
|
||||
void ReadBuffer GLenum
|
||||
void ReadPixels GLint GLint GLsizei GLsizei GLenum GLenum GLvoid*
|
||||
void RenderbufferStorage GLenum GLenum GLsizei GLsizei
|
||||
void RenderbufferStorageMultisample GLenum GLsizei GLenum GLsizei GLsizei
|
||||
|
||||
// --S--
|
||||
void SampleCoverage GLclampf GLboolean
|
||||
void SampleMaski GLuint GLbitfield
|
||||
void SamplerParameterf GLuint GLenum GLfloat
|
||||
void SamplerParameteri GLuint GLenum GLint
|
||||
void SamplerParameterfv GLuint GLenum const_GLfloat*
|
||||
void SamplerParameteriv GLuint GLenum const_GLint*
|
||||
void SamplerParameterIiv GLuint GLenum const_GLint*
|
||||
void SamplerParameterIuiv GLuint GLenum const_GLuint*
|
||||
void Scissor GLint GLint GLsizei GLsizei
|
||||
void ShaderSource GLuint GLsizei const_GLchar** const_GLint*
|
||||
void StencilFunc GLenum GLint GLuint
|
||||
void StencilFuncSeparate GLenum GLenum GLint GLuint
|
||||
void StencilMask GLuint
|
||||
void StencilMaskSeparate GLenum GLuint
|
||||
void StencilOp GLenum GLenum GLenum
|
||||
void StencilOpSeparate GLenum GLenum GLenum GLenum
|
||||
|
||||
// --T--
|
||||
void TexBuffer GLenum GLenum GLuint
|
||||
void TexImage1D GLenum GLint GLint GLsizei GLint GLenum GLenum const_GLvoid*
|
||||
void TexImage2D GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const_GLvoid*
|
||||
void TexImage2DMultisample GLenum GLsizei GLint GLsizei GLsizei GLboolean
|
||||
void TexImage3D GLenum GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const_GLvoid*
|
||||
void TexImage3DMultisample GLenum GLsizei GLint GLsizei GLsizei GLsizei GLboolean
|
||||
void TexParameterf GLenum GLenum GLfloat
|
||||
void TexParameteri GLenum GLenum GLint
|
||||
void TexParameterfv GLenum GLenum const_GLfloat*
|
||||
void TexParameteriv GLenum GLenum const_GLint*
|
||||
void TexParameterIiv GLenum GLenum const_GLint*
|
||||
void TexParameterIuiv GLenum GLenum const_GLuint*
|
||||
void TexSubImage1D GLenum GLint GLint GLsizei GLenum GLenum const_GLvoid*
|
||||
void TexSubImage2D GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum const_GLvoid*
|
||||
void TexSubImage3D GLenum GLint GLint GLint GLint GLsizei GLsizei GLsizei GLenum GLenum const_GLvoid*
|
||||
void TransformFeedbackVaryings GLuint GLsizei const_GLchar** GLenum
|
||||
|
||||
// --U--
|
||||
void Uniform1f GLint GLfloat
|
||||
void Uniform2f GLint GLfloat GLfloat
|
||||
void Uniform3f GLint GLfloat GLfloat GLfloat
|
||||
void Uniform4f GLint GLfloat GLfloat GLfloat GLfloat
|
||||
void Uniform1i GLint GLint
|
||||
void Uniform2i GLint GLint GLint
|
||||
void Uniform3i GLint GLint GLint GLint
|
||||
void Uniform4i GLint GLint GLint GLint GLint
|
||||
void Uniform1ui GLint GLuint
|
||||
void Uniform2ui GLint GLuint GLuint
|
||||
void Uniform3ui GLint GLuint GLuint GLuint
|
||||
void Uniform4ui GLint GLuint GLuint GLuint GLuint
|
||||
void Uniform1fv GLint GLsizei const_GLfloat*
|
||||
void Uniform2fv GLint GLsizei const_GLfloat*
|
||||
void Uniform3fv GLint GLsizei const_GLfloat*
|
||||
void Uniform4fv GLint GLsizei const_GLfloat*
|
||||
void Uniform1iv GLint GLsizei const_GLint*
|
||||
void Uniform2iv GLint GLsizei const_GLint*
|
||||
void Uniform3iv GLint GLsizei const_GLint*
|
||||
void Uniform4iv GLint GLsizei const_GLint*
|
||||
void Uniform1uiv GLint GLsizei const_GLuint*
|
||||
void Uniform2uiv GLint GLsizei const_GLuint*
|
||||
void Uniform3uiv GLint GLsizei const_GLuint*
|
||||
void Uniform4uiv GLint GLsizei const_GLuint*
|
||||
void UniformMatrix2fv GLint GLsizei GLboolean const_GLfloat*
|
||||
void UniformMatrix3fv GLint GLsizei GLboolean const_GLfloat*
|
||||
void UniformMatrix4fv GLint GLsizei GLboolean const_GLfloat*
|
||||
void UniformMatrix2x3fv GLint GLsizei GLboolean const_GLfloat*
|
||||
void UniformMatrix3x2fv GLint GLsizei GLboolean const_GLfloat*
|
||||
void UniformMatrix2x4fv GLint GLsizei GLboolean const_GLfloat*
|
||||
void UniformMatrix4x2fv GLint GLsizei GLboolean const_GLfloat*
|
||||
void UniformMatrix3x4fv GLint GLsizei GLboolean const_GLfloat*
|
||||
void UniformMatrix4x3fv GLint GLsizei GLboolean const_GLfloat*
|
||||
void UniformBlockBinding GLuint GLuint GLuint
|
||||
GLboolean UnmapBuffer GLenum
|
||||
void UseProgram GLuint
|
||||
|
||||
|
||||
void ValidateProgram GLuint
|
||||
void VertexAttrib1f GLuint GLfloat
|
||||
void VertexAttrib1s GLuint GLshort
|
||||
void VertexAttrib1d GLuint GLdouble
|
||||
void VertexAttribI1i GLuint GLint
|
||||
void VertexAttribI1ui GLuint GLuint
|
||||
void VertexAttrib2f GLuint GLfloat GLfloat
|
||||
void VertexAttrib2s GLuint GLshort GLshort
|
||||
void VertexAttrib2d GLuint GLdouble GLdouble
|
||||
void VertexAttribI2i GLuint GLint GLint
|
||||
void VertexAttribI2ui GLuint GLuint GLuint
|
||||
void VertexAttrib3f GLuint GLfloat GLfloat GLfloat
|
||||
void VertexAttrib3s GLuint GLshort GLshort GLshort
|
||||
void VertexAttrib3d GLuint GLdouble GLdouble GLdouble
|
||||
void VertexAttribI3i GLuint GLint GLint GLint
|
||||
void VertexAttribI3ui GLuint GLuint GLuint GLuint
|
||||
void VertexAttrib4f GLuint GLfloat GLfloat GLfloat GLfloat
|
||||
void VertexAttrib4s GLuint GLshort GLshort GLshort GLshort
|
||||
void VertexAttrib4d GLuint GLdouble GLdouble GLdouble GLdouble
|
||||
void VertexAttrib4Nub GLuint GLubyte GLubyte GLubyte GLubyte
|
||||
void VertexAttribI4i GLuint GLint GLint GLint GLint
|
||||
void VertexAttribI4ui GLuint GLuint GLuint GLuint GLuint
|
||||
void VertexAttrib1fv GLuint const_GLfloat*
|
||||
void VertexAttrib1sv GLuint const_GLshort*
|
||||
void VertexAttrib1dv GLuint const_GLdouble*
|
||||
void VertexAttribI1iv GLuint const_GLint*
|
||||
void VertexAttribI1uiv GLuint const_GLuint*
|
||||
void VertexAttrib2fv GLuint const_GLfloat*
|
||||
void VertexAttrib2sv GLuint const_GLshort*
|
||||
void VertexAttrib2dv GLuint const_GLdouble*
|
||||
void VertexAttribI2iv GLuint const_GLint*
|
||||
void VertexAttribI2uiv GLuint const_GLuint*
|
||||
void VertexAttrib3fv GLuint const_GLfloat*
|
||||
void VertexAttrib3sv GLuint const_GLshort*
|
||||
void VertexAttrib3dv GLuint const_GLdouble*
|
||||
void VertexAttribI3iv GLuint const_GLint*
|
||||
void VertexAttribI3uiv GLuint const_GLuint*
|
||||
void VertexAttrib4fv GLuint const_GLfloat*
|
||||
void VertexAttrib4sv GLuint const_GLshort*
|
||||
void VertexAttrib4dv GLuint const_GLdouble*
|
||||
void VertexAttrib4iv GLuint const_GLint*
|
||||
void VertexAttrib4bv GLuint const_GLbyte*
|
||||
void VertexAttrib4ubv GLuint const_GLubyte*
|
||||
void VertexAttrib4usv GLuint const_GLushort*
|
||||
void VertexAttrib4uiv GLuint const_GLuint*
|
||||
void VertexAttrib4Nbv GLuint const_GLbyte*
|
||||
void VertexAttrib4Nsv GLuint const_GLshort*
|
||||
void VertexAttrib4Niv GLuint const_GLint*
|
||||
void VertexAttrib4Nubv GLuint const_GLubyte*
|
||||
void VertexAttrib4Nusv GLuint const_GLushort*
|
||||
void VertexAttrib4Nuiv GLuint const_GLuint*
|
||||
void VertexAttribI4bv GLuint const_GLbyte*
|
||||
void VertexAttribI4ubv GLuint const_GLubyte*
|
||||
void VertexAttribI4sv GLuint const_GLshort*
|
||||
void VertexAttribI4usv GLuint const_GLushort*
|
||||
void VertexAttribI4iv GLuint const_GLint*
|
||||
void VertexAttribI4uiv GLuint const_GLuint*
|
||||
void VertexAttribP1ui GLuint GLenum GLboolean GLuint
|
||||
void VertexAttribP2ui GLuint GLenum GLboolean GLuint
|
||||
void VertexAttribP3ui GLuint GLenum GLboolean GLuint
|
||||
void VertexAttribP4ui GLuint GLenum GLboolean GLuint
|
||||
void VertexAttribDivisor GLuint GLuint
|
||||
void VertexAttribPointer GLuint GLint GLenum GLboolean GLsizei const_GLvoid*
|
||||
void VertexAttribIPointer GLuint GLint GLenum GLsizei const_GLvoid*
|
||||
void Viewport GLint GLint GLsizei GLsizei
|
||||
|
||||
// --W--
|
||||
void WaitSync GLsync GLbitfield GLuint64
|
||||
|
||||
180
libsst-glapi/libsst-glapi.vcxproj
Normal file
180
libsst-glapi/libsst-glapi.vcxproj
Normal file
@@ -0,0 +1,180 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{29F643C8-7935-43E9-B1AB-66FFBCDE9E38}</ProjectGuid>
|
||||
<RootNamespace>libsstglapi</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)\Lib\x64\</OutDir>
|
||||
<IntDir>$(SolutionDir)Intermediate\$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
|
||||
<TargetName>$(ProjectName)-debug</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)\Lib\x64\</OutDir>
|
||||
<IntDir>$(SolutionDir)Intermediate\$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)\Lib\x86\</OutDir>
|
||||
<IntDir>$(SolutionDir)Intermediate\$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
|
||||
<TargetName>$(ProjectName)-debug</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)\Lib\x86\</OutDir>
|
||||
<IntDir>$(SolutionDir)Intermediate\$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)Lib\Include</AdditionalIncludeDirectories>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<CreateHotpatchableImage>false</CreateHotpatchableImage>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)Lib\Include</AdditionalIncludeDirectories>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<CreateHotpatchableImage>false</CreateHotpatchableImage>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)Lib\Include</AdditionalIncludeDirectories>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<CreateHotpatchableImage>false</CreateHotpatchableImage>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)Lib\Include</AdditionalIncludeDirectories>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<CreateHotpatchableImage>false</CreateHotpatchableImage>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="gl33.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SST_GLAPIContext.c" />
|
||||
<ClCompile Include="SST_GLAPIResolve_Win32.c" />
|
||||
<ClCompile Include="SST_GLAPIStruct.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Lib\Include\SST\SST_GLAPI.h" />
|
||||
<ClInclude Include="..\Lib\Include\SST\SST_GLAPIContext.h" />
|
||||
<ClInclude Include="..\Lib\Include\SST\SST_GLAPIDefs.h" />
|
||||
<ClInclude Include="..\Lib\Include\SST\SST_GLAPIMacros.h" />
|
||||
<ClInclude Include="..\Lib\Include\SST\SST_GLAPIStruct.h" />
|
||||
<ClInclude Include="GLAPIPrivate.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
53
libsst-glapi/libsst-glapi.vcxproj.filters
Normal file
53
libsst-glapi/libsst-glapi.vcxproj.filters
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SST_GLAPIContext.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SST_GLAPIResolve_Win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SST_GLAPIStruct.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Lib\Include\SST\SST_GLAPI.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Lib\Include\SST\SST_GLAPIContext.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Lib\Include\SST\SST_GLAPIDefs.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Lib\Include\SST\SST_GLAPIMacros.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Lib\Include\SST\SST_GLAPIStruct.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="GLAPIPrivate.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="gl33.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
4
libsst-glapi/libsst-glapi.vcxproj.user
Normal file
4
libsst-glapi/libsst-glapi.vcxproj.user
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
BIN
libsst-glapi/obj/x86-64/release/SST_GLAPIContext.o
Normal file
BIN
libsst-glapi/obj/x86-64/release/SST_GLAPIContext.o
Normal file
Binary file not shown.
BIN
libsst-glapi/obj/x86-64/release/SST_GLAPIResolve_POSIX.o
Normal file
BIN
libsst-glapi/obj/x86-64/release/SST_GLAPIResolve_POSIX.o
Normal file
Binary file not shown.
BIN
libsst-glapi/obj/x86-64/release/SST_GLAPIStruct.o
Normal file
BIN
libsst-glapi/obj/x86-64/release/SST_GLAPIStruct.o
Normal file
Binary file not shown.
356
libsst-glapi/parsegl.c
Normal file
356
libsst-glapi/parsegl.c
Normal file
@@ -0,0 +1,356 @@
|
||||
/*
|
||||
parsegl.c
|
||||
Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
Created: 12/12/2012
|
||||
|
||||
Purpose:
|
||||
|
||||
Parse GL function definitions and generate libsst-glapi code/headers
|
||||
|
||||
License:
|
||||
|
||||
This program is free software. It comes without any warranty, to
|
||||
the extent permitted by applicable law. You can redistribute it
|
||||
and/or modify it under the terms of the Do What The Fuck You Want
|
||||
To Public License, Version 2, as published by Sam Hocevar. See
|
||||
http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#define DEFS "gl33.txt"
|
||||
|
||||
typedef struct GLFunc
|
||||
{
|
||||
char name[64]; /* Name of OpenGL function, sans "gl" prefix */
|
||||
char returnType[64]; /* C return value type */
|
||||
char argTypes[16][64]; /* C argument type */
|
||||
|
||||
unsigned int constBitmask; /* If bit 'n' is set, then parameter 'n' is a const parameter. highest bit is return type */
|
||||
unsigned int nrArgs; /* Number of arguments in the function */
|
||||
|
||||
struct GLFunc* next; /* Next function in the list */
|
||||
} GLFunc;
|
||||
|
||||
/* These test if parameter is marked as "const" */
|
||||
#define ISCONST(func, n) (func->constBitmask & (1u << n))
|
||||
#define ISCONSTRETURN(func) ISCONST(func, 31u)
|
||||
|
||||
/* Linked list of functions parsed */
|
||||
GLFunc* first = NULL;
|
||||
GLFunc* last = NULL;
|
||||
unsigned int totalParsed = 0;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
static void parseLine(const char* line);
|
||||
static void genStruct(FILE* fp);
|
||||
static void genLinkCode(FILE* fp);
|
||||
static void genMacros(FILE* fp);
|
||||
static void autogenHeader(FILE* fp) { fprintf(fp, "/* AUTOGENERATED BY parsegl.c -- DO NOT MODIFY */\n"); }
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
int main()
|
||||
{
|
||||
char line[1024];
|
||||
FILE* fp = fopen(DEFS, "r");
|
||||
int c;
|
||||
int eolFound = 0;
|
||||
int k = 0;
|
||||
|
||||
/* Can't open GL function definitions? */
|
||||
if(fp == NULL)
|
||||
{
|
||||
printf("Could not open file \"%s\" for reading\n", DEFS);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Read each line of text until EOF */
|
||||
do
|
||||
{
|
||||
c = fgetc(fp);
|
||||
|
||||
switch(c)
|
||||
{
|
||||
/* These end a line */
|
||||
case 0x0A:
|
||||
case 0x0D:
|
||||
eolFound = 1;
|
||||
line[k] = '\0';
|
||||
k=0;
|
||||
break;
|
||||
|
||||
case EOF:
|
||||
break;
|
||||
|
||||
/* Otherwise, copy the line */
|
||||
default:
|
||||
line[k] = (char)c;
|
||||
k++;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Time to parse a line? */
|
||||
if(eolFound)
|
||||
{
|
||||
parseLine(line);
|
||||
eolFound = 0;
|
||||
}
|
||||
|
||||
} while(c != EOF);
|
||||
|
||||
fclose(fp);
|
||||
|
||||
printf("%u GL functions parsed\n", totalParsed);
|
||||
|
||||
/* Write API structure */
|
||||
fp = fopen("SST_GLAPIStruct.h", "w");
|
||||
if(fp != NULL)
|
||||
{
|
||||
autogenHeader(fp);
|
||||
genStruct(fp);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
/* Write runtime API resolution */
|
||||
fp = fopen("SST_GLAPIStruct.c", "w");
|
||||
if(fp != NULL)
|
||||
{
|
||||
autogenHeader(fp);
|
||||
genLinkCode(fp);
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
/* Write canonical glDoThing() macros */
|
||||
fp = fopen("SST_GLAPIMacros.h", "w");
|
||||
if(fp != NULL)
|
||||
{
|
||||
autogenHeader(fp);
|
||||
genMacros(fp);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
/* Done */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Read the line and parse out any GL function definitions */
|
||||
static void parseLine(const char* line)
|
||||
{
|
||||
int exitTime;
|
||||
int k = 0;
|
||||
int nrFound = 0;
|
||||
char word[64];
|
||||
char* s = word;
|
||||
GLFunc* func;
|
||||
|
||||
/* Ignore leading whitespace */
|
||||
while(isspace(*line))
|
||||
line++;
|
||||
|
||||
/* Nothing to parse? */
|
||||
if(strlen(line) == 0)
|
||||
return;
|
||||
|
||||
/* Ignore comment lines */
|
||||
if(line[0] == '/' && line[1] == '/')
|
||||
return;
|
||||
|
||||
memset(word, 0, sizeof(word));
|
||||
func = (GLFunc*)calloc(1, sizeof(*func));
|
||||
|
||||
/* Pull words out of the line */
|
||||
exitTime = 0;
|
||||
do
|
||||
{
|
||||
if(line[k] == '\0')
|
||||
{
|
||||
exitTime = 1;
|
||||
*s = '\0';
|
||||
}
|
||||
if(isspace(line[k]))
|
||||
*s = '\0';
|
||||
else
|
||||
*s = line[k];
|
||||
k++;
|
||||
|
||||
/* Parse word time? */
|
||||
if(*s == '\0')
|
||||
{
|
||||
s = word;
|
||||
|
||||
/* Skip all blank spaces */
|
||||
while(isspace(*s))
|
||||
s++;
|
||||
|
||||
/* Non-zero lengths only, please */
|
||||
if(strlen(s) >= 0)
|
||||
{
|
||||
|
||||
/* First word is the return value type */
|
||||
if(nrFound == 0)
|
||||
{
|
||||
if(strstr(s, "const_"))
|
||||
{
|
||||
func->constBitmask |= (1u << 31);
|
||||
s += strlen("const_");
|
||||
}
|
||||
|
||||
strcpy(func->returnType, s);
|
||||
}
|
||||
else if (nrFound == 1) /* Second word is the function name */
|
||||
strcpy(func->name, s);
|
||||
else /* Remaining words are arguments */
|
||||
{
|
||||
int arg = nrFound - 2;
|
||||
|
||||
/* Is it a const arg? */
|
||||
if(strstr(s, "const_"))
|
||||
{
|
||||
func->constBitmask |= (1u << arg);
|
||||
s += strlen("const_");
|
||||
}
|
||||
|
||||
strcpy(func->argTypes[arg], s);
|
||||
func->nrArgs++;
|
||||
}
|
||||
|
||||
nrFound++;
|
||||
|
||||
} /* non-zero length string */
|
||||
|
||||
s = word;
|
||||
} /* Done parsing word */
|
||||
else
|
||||
s++;
|
||||
|
||||
} while(!exitTime);
|
||||
|
||||
/* Store */
|
||||
if(first == NULL)
|
||||
first = func;
|
||||
|
||||
if(last != NULL)
|
||||
last->next = func;
|
||||
last = func;
|
||||
totalParsed++;
|
||||
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
static void genStruct(FILE* fp)
|
||||
{
|
||||
const GLFunc* func = first;
|
||||
|
||||
fprintf(fp,
|
||||
"#ifndef _SST_GLAPISTRUCT_H\n"
|
||||
"#define _SST_GLAPISTRUCT_H\n\n");
|
||||
fprintf(fp, "#include <SST/SST_GLAPIDefs.h>\n\n");
|
||||
fprintf(fp, "typedef struct SST_GLAPI\n{\n");
|
||||
while(func)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
/* Return value and name of function */
|
||||
fprintf(fp, "\t%s%s (OGLCALL* %s)(",
|
||||
ISCONSTRETURN(func) ? "const " : "",
|
||||
func->returnType,
|
||||
func->name);
|
||||
|
||||
/* Run through each valid argument */
|
||||
for(i=0; i<func->nrArgs; i++)
|
||||
{
|
||||
if(ISCONST(func, i))
|
||||
fprintf(fp, "const ");
|
||||
|
||||
fprintf(fp, "%s", func->argTypes[i]);
|
||||
|
||||
if(i != func->nrArgs-1)
|
||||
fprintf(fp, ", ");
|
||||
}
|
||||
fprintf(fp, ");\n");
|
||||
|
||||
func = func->next;
|
||||
}
|
||||
fprintf(fp, "\t/*======================================*/\n");
|
||||
fprintf(fp, "\tvoid* libGL; /* OpenGL library handle */\n");
|
||||
fprintf(fp, "\tchar* libGLName; /* OpenGL library name */\n");
|
||||
|
||||
|
||||
fprintf(fp, "} SST_GLAPI;\n#endif\n\n");
|
||||
}
|
||||
|
||||
static void genLinkCode(FILE* fp)
|
||||
{
|
||||
const GLFunc* func = first;
|
||||
fprintf(fp, "#include <SST/SST_GLAPIStruct.h>\n");
|
||||
fprintf(fp, "#include \"GLAPIPrivate.h\"\n\n");
|
||||
fprintf(fp, "void resolveGLAPI(const GLAPIResolver* resolver, struct SST_GLAPI* api)\n{\n");
|
||||
|
||||
while(func)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
/* Resolve it */
|
||||
fprintf(fp, "\tapi->%s = resolveGLSymbol(resolver, \"gl%s\");\n",
|
||||
func->name, func->name);
|
||||
|
||||
func = func->next;
|
||||
}
|
||||
|
||||
fprintf(fp, "\n}\n");
|
||||
}
|
||||
|
||||
static void genMacros(FILE* fp)
|
||||
{
|
||||
const GLFunc* func = first;
|
||||
|
||||
fprintf(fp,
|
||||
"#ifndef _SST_GLAPIMACROS_H\n"
|
||||
"#define _SST_GLAPIMACROS_H\n\n");
|
||||
|
||||
while(func)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
/* #define a macro for it */
|
||||
fprintf(fp, "#define gl%s(",func->name);
|
||||
|
||||
/* Label macro arguments as 'a', 'b', 'c', ... */
|
||||
for(i=0; i<func->nrArgs; i++)
|
||||
{
|
||||
fprintf(fp, "%c%s",
|
||||
'a'+i,
|
||||
i < func->nrArgs-1?",":"");
|
||||
}
|
||||
|
||||
fprintf(fp, ") __sstglctx->%s(", func->name);
|
||||
|
||||
/* Label macro arguments as 'a', 'b', 'c', ... */
|
||||
for(i=0; i<func->nrArgs; i++)
|
||||
{
|
||||
fprintf(fp, "(%c)%s",
|
||||
'a'+i,
|
||||
i < func->nrArgs-1?",":"");
|
||||
}
|
||||
fprintf(fp, ")\n");
|
||||
|
||||
|
||||
func = func->next;
|
||||
}
|
||||
|
||||
|
||||
|
||||
fprintf(fp, " \n#endif\n\n");
|
||||
|
||||
}
|
||||
|
||||
18
libsst-glapi/sources-MacOSX.mk
Normal file
18
libsst-glapi/sources-MacOSX.mk
Normal file
@@ -0,0 +1,18 @@
|
||||
# libsst-glapi/sources-MacOSX.mk
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 4/16/2013
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# List of source files for OSX-based systems.
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
SRC += SST_GLAPIResolve_MacOSX.c
|
||||
|
||||
19
libsst-glapi/sources-POSIX.mk
Normal file
19
libsst-glapi/sources-POSIX.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
# libsst-glapi/sources-POSIX.mk
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 12/12/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# List of source files for systems using libGL.so. This reduces the amount
|
||||
# of copy/pasting for different UNIX configurations.
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
SRC += SST_GLAPIResolve_POSIX.c
|
||||
|
||||
18
libsst-glapi/sources-Win32.mk
Normal file
18
libsst-glapi/sources-Win32.mk
Normal file
@@ -0,0 +1,18 @@
|
||||
# libsst-glapi/sources-Win32.mk
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 12/12/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# List of source files for Win32 systems
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
SRC += SST_GLAPIResolve_Win32.c
|
||||
|
||||
Reference in New Issue
Block a user