mirror of
https://github.com/grumpycoders/pcsx-redux.git
synced 2025-04-02 10:41:54 -04:00
242 lines
16 KiB
Lua
242 lines
16 KiB
Lua
--lualoader, R"EOF(--
|
|
--OpenGL binding, taken and modified from https://github.com/malkia/luajit-opencl
|
|
|
|
ffi.cdef[[
|
|
void glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
|
|
void glActiveStencilFaceEXT(GLenum face);
|
|
void glDepthBoundsEXT(GLclampd zmin, GLclampd zmax);
|
|
void glBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeAlpha);
|
|
GLboolean glIsRenderbufferEXT(GLuint renderbuffer);
|
|
void glBindRenderbufferEXT(GLenum target, GLuint renderbuffer);
|
|
void glDeleteRenderbuffersEXT(GLsizei n, const GLuint *renderbuffers);
|
|
void glGenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers);
|
|
void glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
|
void glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params);
|
|
GLboolean glIsFramebufferEXT(GLuint framebuffer);
|
|
void glBindFramebufferEXT(GLenum target, GLuint framebuffer);
|
|
void glDeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers);
|
|
void glGenFramebuffersEXT(GLsizei n, GLuint *framebuffers);
|
|
GLenum glCheckFramebufferStatusEXT(GLenum target);
|
|
void glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
|
void glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
|
void glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
|
void glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
|
void glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
|
void glGenerateMipmapEXT(GLenum target);
|
|
void glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
|
void glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
|
void glProgramParameteriEXT(GLuint program, GLenum pname, GLint value);
|
|
void glFramebufferTextureEXT(GLenum target, GLenum attachment, GLuint texture, GLint level);
|
|
void glFramebufferTextureFaceEXT(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
|
|
void glFramebufferTextureLayerEXT(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
|
|
GLboolean glIsRenderbuffer (GLuint);
|
|
void glBindRenderbuffer (GLenum, GLuint);
|
|
void glDeleteRenderbuffers (GLsizei, const GLuint *);
|
|
void glGenRenderbuffers (GLsizei, GLuint *);
|
|
void glRenderbufferStorage (GLenum, GLenum, GLsizei, GLsizei);
|
|
void glGetRenderbufferParameteriv (GLenum, GLenum, GLint *);
|
|
GLboolean glIsFramebuffer (GLuint);
|
|
void glBindFramebuffer (GLenum, GLuint);
|
|
void glDeleteFramebuffers (GLsizei, const GLuint *);
|
|
void glGenFramebuffers (GLsizei, GLuint *);
|
|
GLenum glCheckFramebufferStatus (GLenum);
|
|
void glFramebufferTexture1D (GLenum, GLenum, GLenum, GLuint, GLint);
|
|
void glFramebufferTexture2D (GLenum, GLenum, GLenum, GLuint, GLint);
|
|
void glFramebufferTexture3D (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
|
|
void glFramebufferRenderbuffer (GLenum, GLenum, GLenum, GLuint);
|
|
void glGetFramebufferAttachmentParameteriv (GLenum, GLenum, GLenum, GLint *);
|
|
void glGenerateMipmap (GLenum);
|
|
void glBlitFramebuffer (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
|
|
void glRenderbufferStorageMultisample (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
|
|
void glFramebufferTextureLayer (GLenum, GLenum, GLuint, GLint, GLint);
|
|
void glBindBufferRangeEXT(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
|
void glBindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer, GLintptr offset);
|
|
void glBindBufferBaseEXT(GLenum target, GLuint index, GLuint buffer);
|
|
void glBeginTransformFeedbackEXT(GLenum primitiveMode);
|
|
void glEndTransformFeedbackEXT(void);
|
|
void glTransformFeedbackVaryingsEXT(GLuint program, GLsizei count, const GLchar **varyings, GLenum bufferMode);
|
|
void glGetTransformFeedbackVaryingEXT(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
|
|
void glGetIntegerIndexedvEXT(GLenum param, GLuint index, GLint *values);
|
|
void glGetBooleanIndexedvEXT(GLenum param, GLuint index, GLboolean *values);
|
|
void glUniformBufferEXT(GLuint program, GLint location, GLuint buffer);
|
|
GLint glGetUniformBufferSizeEXT(GLuint program, GLint location);
|
|
GLintptr glGetUniformOffsetEXT(GLuint program, GLint location);
|
|
void glClearColorIiEXT( GLint r, GLint g, GLint b, GLint a );
|
|
void glClearColorIuiEXT( GLuint r, GLuint g, GLuint b, GLuint a );
|
|
void glTexParameterIivEXT( GLenum target, GLenum pname, GLint *params );
|
|
void glTexParameterIuivEXT( GLenum target, GLenum pname, GLuint *params );
|
|
void glGetTexParameterIivEXT( GLenum target, GLenum pname, GLint *params);
|
|
void glGetTexParameterIuivEXT( GLenum target, GLenum pname, GLuint *params);
|
|
void glVertexAttribI1iEXT(GLuint index, GLint x);
|
|
void glVertexAttribI2iEXT(GLuint index, GLint x, GLint y);
|
|
void glVertexAttribI3iEXT(GLuint index, GLint x, GLint y, GLint z);
|
|
void glVertexAttribI4iEXT(GLuint index, GLint x, GLint y, GLint z, GLint w);
|
|
void glVertexAttribI1uiEXT(GLuint index, GLuint x);
|
|
void glVertexAttribI2uiEXT(GLuint index, GLuint x, GLuint y);
|
|
void glVertexAttribI3uiEXT(GLuint index, GLuint x, GLuint y, GLuint z);
|
|
void glVertexAttribI4uiEXT(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
|
|
void glVertexAttribI1ivEXT(GLuint index, const GLint *v);
|
|
void glVertexAttribI2ivEXT(GLuint index, const GLint *v);
|
|
void glVertexAttribI3ivEXT(GLuint index, const GLint *v);
|
|
void glVertexAttribI4ivEXT(GLuint index, const GLint *v);
|
|
void glVertexAttribI1uivEXT(GLuint index, const GLuint *v);
|
|
void glVertexAttribI2uivEXT(GLuint index, const GLuint *v);
|
|
void glVertexAttribI3uivEXT(GLuint index, const GLuint *v);
|
|
void glVertexAttribI4uivEXT(GLuint index, const GLuint *v);
|
|
void glVertexAttribI4bvEXT(GLuint index, const GLbyte *v);
|
|
void glVertexAttribI4svEXT(GLuint index, const GLshort *v);
|
|
void glVertexAttribI4ubvEXT(GLuint index, const GLubyte *v);
|
|
void glVertexAttribI4usvEXT(GLuint index, const GLushort *v);
|
|
void glVertexAttribIPointerEXT(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
|
void glGetVertexAttribIivEXT(GLuint index, GLenum pname, GLint *params);
|
|
void glGetVertexAttribIuivEXT(GLuint index, GLenum pname, GLuint *params);
|
|
void glUniform1uiEXT(GLint location, GLuint v0);
|
|
void glUniform2uiEXT(GLint location, GLuint v0, GLuint v1);
|
|
void glUniform3uiEXT(GLint location, GLuint v0, GLuint v1, GLuint v2);
|
|
void glUniform4uiEXT(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
|
|
void glUniform1uivEXT(GLint location, GLsizei count, const GLuint *value);
|
|
void glUniform2uivEXT(GLint location, GLsizei count, const GLuint *value);
|
|
void glUniform3uivEXT(GLint location, GLsizei count, const GLuint *value);
|
|
void glUniform4uivEXT(GLint location, GLsizei count, const GLuint *value);
|
|
void glGetUniformuivEXT(GLuint program, GLint location, GLuint *params);
|
|
void glBindFragDataLocationEXT(GLuint program, GLuint colorNumber, const GLchar *name);
|
|
GLint glGetFragDataLocationEXT(GLuint program, const GLchar *name);
|
|
void glColorMaskIndexedEXT(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
|
|
void glEnableIndexedEXT(GLenum target, GLuint index);
|
|
void glDisableIndexedEXT(GLenum target, GLuint index);
|
|
GLboolean glIsEnabledIndexedEXT(GLenum target, GLuint index);
|
|
void glProvokingVertexEXT(GLenum mode);
|
|
void glTextureRangeAPPLE(GLenum target, GLsizei length, const GLvoid *pointer);
|
|
void glGetTexParameterPointervAPPLE(GLenum target, GLenum pname, GLvoid **params);
|
|
void glVertexArrayRangeAPPLE(GLsizei length, const GLvoid *pointer);
|
|
void glFlushVertexArrayRangeAPPLE(GLsizei length, const GLvoid *pointer);
|
|
void glVertexArrayParameteriAPPLE(GLenum pname, GLint param);
|
|
void glBindVertexArrayAPPLE(GLuint id);
|
|
void glDeleteVertexArraysAPPLE(GLsizei n, const GLuint *ids);
|
|
void glGenVertexArraysAPPLE(GLsizei n, GLuint *ids);
|
|
GLboolean glIsVertexArrayAPPLE(GLuint id);
|
|
void glGenFencesAPPLE(GLsizei n, GLuint *fences);
|
|
void glDeleteFencesAPPLE(GLsizei n, const GLuint *fences);
|
|
void glSetFenceAPPLE(GLuint fence);
|
|
GLboolean glIsFenceAPPLE(GLuint fence);
|
|
GLboolean glTestFenceAPPLE(GLuint fence);
|
|
void glFinishFenceAPPLE(GLuint fence);
|
|
GLboolean glTestObjectAPPLE(GLenum object, GLuint name);
|
|
void glFinishObjectAPPLE(GLenum object, GLuint name);
|
|
void glElementPointerAPPLE(GLenum type, const GLvoid *pointer);
|
|
void glDrawElementArrayAPPLE(GLenum mode, GLint first, GLsizei count);
|
|
void glDrawRangeElementArrayAPPLE(GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
|
|
void glMultiDrawElementArrayAPPLE(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
|
|
void glMultiDrawRangeElementArrayAPPLE(GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
|
|
void glFlushRenderAPPLE(void);
|
|
void glFinishRenderAPPLE(void);
|
|
void glSwapAPPLE(void);
|
|
void glEnableVertexAttribAPPLE(GLuint index, GLenum pname);
|
|
void glDisableVertexAttribAPPLE(GLuint index, GLenum pname);
|
|
GLboolean glIsVertexAttribEnabledAPPLE(GLuint index, GLenum pname);
|
|
void glMapVertexAttrib1dAPPLE(GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
|
|
void glMapVertexAttrib1fAPPLE(GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
|
|
void glMapVertexAttrib2dAPPLE(GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
|
|
void glMapVertexAttrib2fAPPLE(GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
|
|
void glBufferParameteriAPPLE(GLenum target, GLenum pname, GLint param);
|
|
void glFlushMappedBufferRangeAPPLE(GLenum target, GLintptr offset, GLsizeiptr size);
|
|
GLenum glObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option);
|
|
GLenum glObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option);
|
|
void glGetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, GLint* params);
|
|
void glPNTrianglesiATI(GLenum pname, GLint param);
|
|
void glPNTrianglesfATI(GLenum pname, GLfloat param);
|
|
void glBlendEquationSeparateATI(GLenum equationRGB, GLenum equationAlpha);
|
|
void glStencilOpSeparateATI(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
|
void glStencilFuncSeparateATI(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
|
|
void glPNTrianglesiATIX(GLenum pname, GLint param);
|
|
void glPNTrianglesfATIX(GLenum pname, GLfloat param);
|
|
void glPointParameteriNV(GLenum pname, GLint param);
|
|
void glPointParameterivNV(GLenum pname, const GLint *params);
|
|
void glBeginConditionalRenderNV (GLuint id, GLenum mode);
|
|
void glEndConditionalRenderNV (void);
|
|
void glAccum (GLenum op, GLfloat value);
|
|
void glAlphaFunc (GLenum func, GLclampf ref);
|
|
GLboolean glAreTexturesResident (GLsizei n, const GLuint *textures, GLboolean *residences);
|
|
void glArrayElement (GLint i);
|
|
void glBegin (GLenum mode);
|
|
void glBindTexture (GLenum target, GLuint texture);
|
|
void glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
|
|
void glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
|
void glBlendEquation (GLenum mode);
|
|
void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
|
|
void glBlendFunc (GLenum sfactor, GLenum dfactor);
|
|
void glCallList (GLuint list);
|
|
void glCallLists (GLsizei n, GLenum type, const GLvoid *lists);
|
|
void glClear (GLbitfield mask);
|
|
void glClearAccum (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
|
void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
|
void glClearDepth (GLclampd depth);
|
|
void glClearIndex (GLfloat c);
|
|
void glClearStencil (GLint s);
|
|
void glClipPlane (GLenum plane, const GLdouble *equation);
|
|
void glColor3b (GLbyte red, GLbyte green, GLbyte blue);
|
|
void glColor3bv (const GLbyte *v);
|
|
void glColor3d (GLdouble red, GLdouble green, GLdouble blue);
|
|
void glColor3dv (const GLdouble *v);
|
|
void glColor3f (GLfloat red, GLfloat green, GLfloat blue);
|
|
void glColor3fv (const GLfloat *v);
|
|
void glColor3i (GLint red, GLint green, GLint blue);
|
|
void glColor3iv (const GLint *v);
|
|
void glColor3s (GLshort red, GLshort green, GLshort blue);
|
|
void glColor3sv (const GLshort *v);
|
|
void glColor3ub (GLubyte red, GLubyte green, GLubyte blue);
|
|
void glColor3ubv (const GLubyte *v);
|
|
void glColor3ui (GLuint red, GLuint green, GLuint blue);
|
|
void glColor3uiv (const GLuint *v);
|
|
void glColor3us (GLushort red, GLushort green, GLushort blue);
|
|
void glColor3usv (const GLushort *v);
|
|
void glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
|
|
void glColor4bv (const GLbyte *v);
|
|
void glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
|
|
void glColor4dv (const GLdouble *v);
|
|
void glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
|
void glColor4fv (const GLfloat *v);
|
|
void glColor4i (GLint red, GLint green, GLint blue, GLint alpha);
|
|
void glColor4iv (const GLint *v);
|
|
void glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha);
|
|
void glColor4sv (const GLshort *v);
|
|
void glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
|
|
void glColor4ubv (const GLubyte *v);
|
|
void glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha);
|
|
void glColor4uiv (const GLuint *v);
|
|
void glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha);
|
|
void glColor4usv (const GLushort *v);
|
|
void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
|
void glColorMaterial (GLenum face, GLenum mode);
|
|
void glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
|
void glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
|
|
void glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
|
|
void glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params);
|
|
void glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params);
|
|
void glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
|
|
void glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
|
|
void glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params);
|
|
void glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params);
|
|
void glConvolutionParameteri (GLenum target, GLenum pname, GLint params);
|
|
void glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params);
|
|
void glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
|
|
void glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
|
|
void glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
|
|
void glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
|
|
void glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
|
|
void glCopyTexImage1D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
|
|
void glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
|
void glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
|
|
void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
|
void glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
|
void glCullFace (GLenum mode);
|
|
void glDeleteLists (GLuint list, GLsizei range);
|
|
void glDeleteTextures (GLsizei n, const GLuint *textures);
|
|
void glDepthFunc (GLenum func);
|
|
void glDepthMask (GLboolean flag);
|
|
void glDepthRange (GLclampd zNear, GLclampd zFar);
|
|
void glDisable (GLenum cap);
|
|
void glDisableClientState (GLenum array);
|
|
]]
|
|
|
|
-- )EOF"
|