Classes | Functions | Variables
KGLLib Namespace Reference

KGLLib namespace. More...


class  Batch
 A set of geometry. More...
class  Camera
 Camera class. More...
class  FPSCounter
 Utility class that measures FPS. More...
class  GeometryBufferFormat
 Utility class to represent format of a GeometryBuffer. More...
class  GeometryBuffer
 Collection of geometry data. More...
class  GeometryBufferVertexArray
 GeometryBuffer that uses vertex arrays. More...
class  GeometryBufferVBO
 GeometryBuffer that uses VBOs. More...
class  GLWidget
 Easy to use GL widget, based on QGLWidget. More...
class  Mesh
 Set of geometry with program and texture(s) More...
class  Program
 Program class. More...
class  Renderer
class  Shader
 Shader class. More...
class  VertexShader
class  FragmentShader
class  TextRenderer
 Enhanced text renderer. More...
class  TextureBase
 Abstract base class for all textures. More...
class  Texture
 2D texture class More...
class  Texture3D
 3D texture class More...
class  HdrGLWidget
class  HdrGLWidgetControl
class  ModelLoader
class  RenderTarget
class  SimpleTerrain
class  TrackBall
class  WidgetProxy
 Embeds QWidgets in GLWidget. More...


bool init (Renderer *r)
bool checkGLError (const QString &desc)
unsigned int version ()
unsigned int versionMajor ()
unsigned int versionMinor ()
unsigned int versionRelease ()
bool isVersion (unsigned int a, unsigned int b, unsigned int c)
const char * versionString ()
uint qHash (const ModelLoader::FaceVertex &v)
QDebug & operator<< (QDebug &debug, const Vector3f &v)
QDebug & operator<< (QDebug &debug, const Vector2f &v)


Rendererrenderer = 0

Detailed Description

KGLLib namespace.

Everything within KGLLib is contained in this namespace.

Function Documentation

KGLLIB_EXPORT bool KGLLib::checkGLError ( const QString &  desc)

Checks if any OpenGL errors have occurred. If an error has occurred, the error is printed out along with the given description.

whether error has _not_ occurred (i.e. if error has occurred, return false) TODO: maybe change it to return whether errors _has_ occurred?
KGLLIB_EXPORT bool KGLLib::init ( Renderer *  r = 0)

Initializes KGLLib. Note that you must have a current OpenGL context when you call this, otherwise it will fail.

rif given then renderer pointer is set to this object and it's init() method is called. If not given then default Renderer object is created.
whether initialization succeeded.

References renderer.

Referenced by KGLLib::Batch::Batch(), and KGLLib::GLWidget::initializeGL().

KGLLIB_EXPORT bool KGLLib::isVersion ( unsigned int  a,
unsigned int  b,
unsigned int  c 

Checks if KGLLib's version is at least the given version.

KGLLIB_EXPORT unsigned int KGLLib::version ( )

Returns the encoded runtime version of KGLLib.

The returned value is encoded according to the KGLLIB_MAKE_VERSION macro.

KGLLIB_EXPORT unsigned int KGLLib::versionMajor ( )

Returns the major number of KGLLib's version, e.g. 0 for 0.1.2

KGLLIB_EXPORT unsigned int KGLLib::versionMinor ( )

Returns the minor number of KGLLib's version, e.g. 1 for 0.1.2

KGLLIB_EXPORT unsigned int KGLLib::versionRelease ( )

Returns the release number of KGLLib's version, e.g. 2 for 0.1.2

KGLLIB_EXPORT const char * KGLLib::versionString ( )

Returns KGLLib's version as a string, e.g. "0.1.2"

Variable Documentation

KGLLIB_EXPORT Renderer * KGLLib::renderer = 0

Pointer to the global renderer object. Renderer object is guaranteed to be available after init() has been called

Referenced by KGLLib::TextureBase::bind(), KGLLib::Program::bind(), KGLLib::TextureBase::disable(), KGLLib::TextureBase::enable(), init(), KGLLib::TextureBase::unbind(), and KGLLib::Program::unbind().