Attempt to convert api/GL/glcorearb.h definitions to Pony.
Version used: b9e1d1a1b37bb064a6d0e3fceffa8aeab5713a38.
Warning: experimental and un-tested, suggestions and pull-requests are welcome.
Warning: only tested on Linux, GLlibs.pony might have to be improved to support other platforms.
Add this repository as a submodule to your application:
git submodule add git@github.com:xpac27/pony-gl.git
Include this package in your Pony application:
use "pony-gl/Gl"
Start calling OpenGL methods from your Pony application:
env.out.print("GL version: " + String.from_cstring(Gl.glGetString(GLVersion())))
Or use provided helpers:
env.out.print("GL version: " + GlHelper.glGetString(GLVersion()))
You might want to using this package together with GLFW3.
Names are preserved and mapped to Pony types.
GLbitfieldisU32GLbooleanisU32GLbyteisI8GLcharisU8GLdoubleisF64GLenumisU32GLfloatisF32GLintisI32GLint64isI64GLint64EXTisI64GLintptrisISizeGLshortisI16GLsizeiisI32GLsizeiptrisISizeGLubyteisU8GLuintisU32GLuint64isU64GLuint64EXTisU64GLushortisU16
Names are converted to multicase (GL_VERSION becomes GLVersion). Using primitives of type GLbitfield except for GLTrue and GLFalse that use GLboolean.
The following defines have been renamed because they confilct with the type names.
GLBytetoGLByteTypeGLDoubletoGLDoubleTypeGLFloattoGLFloatTypeGLInttoGLIntTypeGLShorttoGLShortType
Pointers are treated in the following way:
T*arguments are replaced byPointer[T]T**arguments are replaced byPointer[Pointer[T]]
Names are preserved but scopped inside a Gl primitive (glGetString becomes Gl.glGetString).