[Haskell-cafe] ANNOUNCE: New OpenGL packages

Sven Panne svenpanne at gmail.com
Sun Sep 15 18:23:02 CEST 2013

New versions of the OpenGL packages are available on Hackage:

   * OpenGLRaw
   * GLURaw
   * OpenGL
   * GLUT

The mid-term goal is to make all these packages conform to the latest
OpenGL 4.4 specification, and while we're not yet there, this release
is nevertheless an important stepping stone towards that goal. The
packages contain a few non-backwards compatible changes, something
which is never nice for a public API, but it has been necessary:
OpenGL has come a long way from its initial fixed function pipeline to
its current form flexible form centered around shaders and buffers.
Because of this, a few design decisions on the Haskell side were not a
good fit anymore and simply had to change. Nevertheless, almost all
changes needed in the applications and libraries using the OpenGL
packages should be mechanical and straightforward. If not:
hopengl at haskell.org is the place to get help if needed.

Hopefully the new packages will make it into the next Haskell Platform
release (2013.4.0.0), at least if I find out how to make it through
the proposal process... ;-)


P.S.: Here a list of the changes for each package:

Changes in the OpenGLRaw package

* Added support for the following extensions:


* Added GLfixed type from OpenGL 4.1.

* Moved GLhandle type to
Graphics.Rendering.OpenGL.Raw.ARB.ShaderObjects where it belongs and
fixed its representation on Mac OS X.

* Added new Graphics.Rendering.OpenGL.Raw.Type module which exports
all GL types. Core31 and Core32 export only their respective subset

* Correctly typed bitfield tokens as, well, GLbitfield instead of GLenum.

* Consistently use ‘Ptr a’ for ‘void*’ which are not opaque.

* Use ccall instead of stdcall on x86_64-windows.

* Use the OpenGLES framework on iOS.

Changes in the GLURaw package

* Use ccall instead of stdcall on x86_64-windows.

* Use the OpenGLES framework on iOS.

Changes in the OpenGL package

* Added sync object support.

* Added full support for OpenGL 4.4 query objects, extending and
changing the previous query object API a bit.

* Split ObjectName class into ObjectName + GeneratableObjectName
classes. Added single-name variants deleteObjectName and
genObjectName, they are a very common use case.

* Made BufferObject and TextureObject abstract. Now all GL objects
names are abstract and have to be explicitly generated. The only
exception is DisplayList, which is required to be non-abstract by the

* Shader is not a class anymore, but a data type with an ObjectName
instance and a creation action. Added ShaderType and shaderType.

* Added partial support for tessellation/geometry/compute shaders.

* Program is not a GeneratableObjectName, but has a createProgram
action now. Added attachShader and detachShader for incremental

* Deprecated shaderSource and added shaderSourceBS instead. Using
ByteString is more efficient and forces the caller to think about
encodings, e.g. via Data.Text.Encoding.

* Added support for shader/program binaries and shader precision queries.

* Revamped texture targets, adding partial support for texture buffer
objects and texture arrays.

* OpenGL 3.1 deprecated separate polygon draw modes, so use
GL_FRONT_AND_BACK internally in polygonMode whenever possible.

* Added missing Eq/Ord/Show instances for lots of data types.

* Simplified TransformFeedbackVaryings API, making it a bit more
similar to the one for activeAttribs and activeUniforms.

* Exported ContextProfile’.

* Renamed BlitFramebufferMask (to BlitBuffer) and its constructors.

* Renamed BufferRangeAccessBit (to MapBufferUsage) and its constructors

* Removed currentMatrix, genLists, deleteLists and isList, they have
been deprecated for ages.

* Full internal support for UTF-8.

* Do not expose internal #hidden modules.

* Lots of Haddock fixes and improvements.

* Renamed IndexedTransformFeedbackBuffer to IndexedTransformFeedbackBuffer.

* Fixed clip plane query.

Changes in the GLUT package

* Deprecated the misspelled ContinueExectuion constructor and added a
new one correctly called ContinueExecution instead.

* Use ccall instead of stdcall on x86_64-windows.

* Do not expose internal #hidden modules.

More information about the Haskell-Cafe mailing list