Skip to content

SharpGL 2.1

Compare
Choose a tag to compare
@dwmkerr dwmkerr released this 10 Mar 21:05

SharpGL 2.1 provides increased support for Materials and Textures. Much of the code in this release has come from TheOtherSean and I would like to thank him very much for his contributions!

2.1 fixes many bugs found in 2.0 and provides improvements in the Shader parsing. It also marks the beginning of a shorter release cycle for SharpGL, releases will be made more regularly from this point onwards.

Features

  • The SceneGraph now has the IHasMaterial interface. This allows SceneObjects to render geometry with Materials and Textures bound to them.
  • The 'RenderTrigger' property of the OpenGLControl allows manual rendering to be used, rather than a timer/FPS approach.
  • The .obj loader has been improved to support the loading of materials from .obj files.
  • The PolygonLoadingSample has new menu options for switching rendering modes (line, filled, lighted/filled). It handles the rendering of materials and has a new menu option for clearing loaded polygons.
  • All Quadrics support materials.
  • Faces support materials.
  • The teapot supports materials.
  • Polygons support materials.
  • Materials can be created from a Bitmap object. Previously they could be created from a file path only.
  • The render loop can be turned off to allow rendering to be manually invoked.
  • Intellisense documentation is provided with the binaries.

Bug Fixes

  • Materials would attempt to bind a texture even if the texture didn't exist, this has been resolved.
  • Changing the framerate would have no effect in the OpenGLControl.
  • 2D Drawing Sample for WPF has had some bug fixes.
  • DrawText wasn't using display list numbers generated by OpenGL, causing issues in some scenarios.
  • GLSL Parser will no longer complain about invalid tokens in shaders.
  • glColor functions use the correct values when provided with bytes.
  • Framerate issues have been resolved in the WPF and WinForms controls.

Breaking Changes

  • The OpenGLDraw and GDIDraw functions are now RenderEventHandler delegate types rather than PaintEventHandler. RenderEventHandler takes a RenderEventArgs parameter which contains the Graphics objects.