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.
GLbitfield
isU32
GLboolean
isU32
GLbyte
isI8
GLchar
isU8
GLdouble
isF64
GLenum
isU32
GLfloat
isF32
GLint
isI32
GLint64
isI64
GLint64EXT
isI64
GLintptr
isISize
GLshort
isI16
GLsizei
isI32
GLsizeiptr
isISize
GLubyte
isU8
GLuint
isU32
GLuint64
isU64
GLuint64EXT
isU64
GLushort
isU16
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.
GLByte
toGLByteType
GLDouble
toGLDoubleType
GLFloat
toGLFloatType
GLInt
toGLIntType
GLShort
toGLShortType
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
).