Skip to content

Ice OpenGL refactoring

Guillaume Pasero requested to merge 1930-shader-bug-xp into develop

The rendering library Ice is refactored with modern OpenGL API ("GLSL" mode, shaders + Vertex Aray). A large part of the functions previously used were deprecated since OpenGL 3.0, and removed in OpenGL 4.6.

The compatibility mode is still there ("OpenGL" mode).

Minimum versions for GLSL mode are: OpenGL 3.0, GLSL 1.30.

Details on the refactoring:

  • Shaders now have vertex and fragment programs. FragmentShader renamed to Shader.
  • All GlActors can have a shader. When GLSL is ON, client code should call actor->CreateShader() after creating the Actor.
  • New shader: MinimalShader, it handles the projection and model matrices, and uses a constant color.
  • New classes added:
    • GlError : reporting of OpenGL error codes
    • GlHandle : handling of OpenGL resources (VA, VBO)
    • GlBufferObject : handles a Buffer Object (support both VertexBufferObject and IndexBufferObject): creation, binding, deletion
    • GlVertexArray : handles a Vertex Array Object: creation, binding, deletion
    • GlMesh : generic structure for a mesh geometry (list of vertices + faces). Used to implement VA/VBO for GlImageActor and GlROIActor

Related to #1930 (closed)

Merge request reports