Move to Vulkan style function typedefs

PFN_FunctionName is more readable than SCREAMSOUP_T.

Context creation API function typedefs are kept as-is where the original
header provided them, for compatibility and familiarity reasons.
This commit is contained in:
Camilla Löwy
2016-12-06 20:10:51 +01:00
parent 887e58bd21
commit 32eb50b75e
11 changed files with 121 additions and 120 deletions
+14 -14
View File
@@ -42,13 +42,13 @@
typedef void* OSMesaContext;
typedef void (*OSMESAproc)();
typedef OSMesaContext (* PFNOSMESACREATECONTEXTATTRIBSPROC)(const int*,OSMesaContext);
typedef OSMesaContext (* PFNOSMESACREATECONTEXTEXTPROC)(GLenum,GLint,GLint,GLint,OSMesaContext);
typedef void (* PFNOSMESADESTROYCONTEXTPROC)(OSMesaContext);
typedef int (* PFNOSMESAMAKECURRENTPROC)(OSMesaContext,void*,int,int,int);
typedef int (* PFNOSMESAGETCOLORBUFFERPROC)(OSMesaContext,int*,int*,int*,void**);
typedef int (* PFNOSMESAGETDEPTHBUFFERPROC)(OSMesaContext,int*,int*,int*,void**);
typedef GLFWglproc (* PFNOSMESAGETPROCADDRESSPROC)(const char*);
typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextExt)(GLenum,GLint,GLint,GLint,OSMesaContext);
typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextAttribs)(const int*,OSMesaContext);
typedef void (GLAPIENTRY * PFN_OSMesaDestroyContext)(OSMesaContext);
typedef int (GLAPIENTRY * PFN_OSMesaMakeCurrent)(OSMesaContext,void*,int,int,int);
typedef int (GLAPIENTRY * PFN_OSMesaGetColorBuffer)(OSMesaContext,int*,int*,int*,void**);
typedef int (GLAPIENTRY * PFN_OSMesaGetDepthBuffer)(OSMesaContext,int*,int*,int*,void**);
typedef GLFWglproc (GLAPIENTRY * PFN_OSMesaGetProcAddress)(const char*);
#define OSMesaCreateContextExt _glfw.osmesa.CreateContextExt
#define OSMesaCreateContextAttribs _glfw.osmesa.CreateContextAttribs
#define OSMesaDestroyContext _glfw.osmesa.DestroyContext
@@ -78,13 +78,13 @@ typedef struct _GLFWlibraryOSMesa
{
void* handle;
PFNOSMESACREATECONTEXTEXTPROC CreateContextExt;
PFNOSMESACREATECONTEXTATTRIBSPROC CreateContextAttribs;
PFNOSMESADESTROYCONTEXTPROC DestroyContext;
PFNOSMESAMAKECURRENTPROC MakeCurrent;
PFNOSMESAGETCOLORBUFFERPROC GetColorBuffer;
PFNOSMESAGETDEPTHBUFFERPROC GetDepthBuffer;
PFNOSMESAGETPROCADDRESSPROC GetProcAddress;
PFN_OSMesaCreateContextExt CreateContextExt;
PFN_OSMesaCreateContextAttribs CreateContextAttribs;
PFN_OSMesaDestroyContext DestroyContext;
PFN_OSMesaMakeCurrent MakeCurrent;
PFN_OSMesaGetColorBuffer GetColorBuffer;
PFN_OSMesaGetDepthBuffer GetDepthBuffer;
PFN_OSMesaGetProcAddress GetProcAddress;
} _GLFWlibraryOSMesa;