Chapter 5. Remarks for OpenGL drawing

Table of Contents

OpenGL init
OpenGL projection
OpenGL custom drawing
Drawing within paintWidget(UGraphics*)
Drawing outside of the libUFO hierarchy.

This chapter gives some remarks how to use libUFO with OpenGL.

OpenGL init

Here is listed what libUFO does change to the standard OpenGL state.

All changes are reverted when calling UGraphics::end().

Please note that this may change from version to version.

  • flat shading (glShadeModel(GL_FLAT)).
  • Disabled depth test (glDisable(GL_DEPTH_TEST)).
  • Disabled 2D textures (glDisable(GL_TEXTURE_2D)).
  • y-flipped ortho projection (see OpenGL projection).