OSDL::Video::OpenGL Namespace Reference

All OpenGL-specific operations and conventions are encapsulated here, be they related to 2D or 3D. More...

Namespaces

namespace  GLU
 

Gathers appropriate GLU (OpenGL Utility Library) encapsulations for better integration into OSDL.


Classes

class  OpenGLException
 Exception to be raised when OpenGL operations fail. More...
class  OpenGLContext
 An OpenGL context corresponds to the state of a running OpenGL screen. More...
class  GLTextureException
 Exception to be raised when OpenGL texture operations fail. More...
class  GLTexture
 Encapsulates an OpenGL texture, constructed directly or not from a surface, that can be loaded as resource. More...

Typedefs

typedef SDL_GLattr GLAttribute
 OpenGL attribute.
typedef GLfloat GLLength
 Length, OpenGL unit of measure.
typedef GLfloat GLCoordinate
 Coordinate, OpenGL unit of measure.
typedef unsigned int GLBitField
 Bit field for OpenGL selection.
typedef unsigned int GLEnumeration
 Enumeration for OpenGL selection.
typedef GLU::Int GLTextureIdentifier
 Texture identifier.
typedef Ceylan::CountedPointer
< GLTexture
TextureCountedPtr
 Texture counted pointer.

Enumerations

enum  Flavour { None, OpenGLFor2D, OpenGLFor3D, Reload }
 

Various flavours (presets) are available for OpenGL.

More...
enum  Feature {
  Alphablending = GL_BLEND, TwoDimensionalTexturing = GL_TEXTURE_2D, CullPolygons = GL_CULL_FACE, DepthTests = GL_DEPTH_TEST,
  Lighting = GL_LIGHTING, Light_1 = GL_LIGHT0, Light_2 = GL_LIGHT1, Light_3 = GL_LIGHT2,
  Light_4 = GL_LIGHT3, Light_5 = GL_LIGHT4, Light_6 = GL_LIGHT5, Light_7 = GL_LIGHT6,
  Light_8 = GL_LIGHT7
}
 

Lists the overall OpenGL features that can be enabled or not.

More...

Variables

OSDL_DLL Pixels::ColorMask RedMask = 0xff000000
 Mask used for OpenGL RGBA color specification for red, depending on the endianness of the local machine.
OSDL_DLL Pixels::ColorMask GreenMask = 0x00ff0000
 Mask used for OpenGL RGBA color specification for green, depending on the endianness of the local machine.
OSDL_DLL Pixels::ColorMask BlueMask = 0x0000ff00
 Mask used for OpenGL RGBA color specification for blue, depending on the endianness of the local machine.
OSDL_DLL Pixels::ColorMask AlphaMask = 0x000000ff
 Mask used for OpenGL RGBA color specification for alpha, depending on the endianness of the local machine.

Detailed Description

All OpenGL-specific operations and conventions are encapsulated here, be they related to 2D or 3D.

The OpenGL viewport is set so that it covers all of the setMode-created surface, which must have been set with the OpenGL flag (directly and/or through the selection of an OpenGL flavour).

See also:
http://osdl.sf.net/main/documentation/rendering/SDL-openGL.html for further implementation details.

Typedef Documentation

OpenGL attribute.

GL prefix is kept to avoid namespace misuse.

Definition at line 64 of file OSDLOpenGL.h.

typedef unsigned int OSDL::Video::OpenGL::GLBitField

Bit field for OpenGL selection.

GL prefix is kept to avoid namespace misuse.

The real GLbitfield is (usually) unsigned int.

Definition at line 246 of file OSDLOpenGL.h.

Coordinate, OpenGL unit of measure.

GL prefix is kept to avoid namespace misuse.

Definition at line 235 of file OSDLOpenGL.h.

typedef unsigned int OSDL::Video::OpenGL::GLEnumeration

Enumeration for OpenGL selection.

GL prefix is kept to avoid namespace misuse.

The real GLenum is (usually) unsigned int.

Definition at line 257 of file OSDLOpenGL.h.

Length, OpenGL unit of measure.

GL prefix is kept to avoid namespace misuse.

Definition at line 226 of file OSDLOpenGL.h.

Texture identifier.

Note:
Made so that it can be converted (i.e. has at least the same value range) into OpenGL texture identifier, Gluint (which is 'unsigned int' in general).

No 'typedef GLUint GLTextureIdentifier' could be kept, as it would have made this header file depend on OSDLConfig, which should not be installed.

Definition at line 72 of file OSDLGLTexture.h.

typedef Ceylan::CountedPointer<GLTexture> OSDL::Video::OpenGL::TextureCountedPtr

Texture counted pointer.

Definition at line 594 of file OSDLGLTexture.h.


Enumeration Type Documentation

Lists the overall OpenGL features that can be enabled or not.

Enumerator:
Alphablending 
TwoDimensionalTexturing 
CullPolygons 
DepthTests 
Lighting 
Light_1 
Light_2 
Light_3 
Light_4 
Light_5 
Light_6 
Light_7 
Light_8 

Definition at line 293 of file OSDLOpenGL.h.

Various flavours (presets) are available for OpenGL.

The flavour must be selected before or during the call to setMode, and will not take effect until that call.

Following flavours are available:

  • None: no further action taken after basic OpenGL initialization
  • OpenGLFor2D: dedicated for accelerated 2D with OpenGL
  • OpenGLFor3D: classical full-blown 3D
  • Reload: designates the same settings as the ones that were lastly used, just set them back in the state machine. This is useful for example when a resize occurs: the actual OpenGL context of the state machine is lost on some platforms, so the OSDL OpenGLContext object must set them again during the setMode call.
Note:
It results in loading the appropriate OpenGL settings for the selected mode, including projection, model view matrix, etc.
Enumerator:
None 
OpenGLFor2D 
OpenGLFor3D 
Reload 

Definition at line 284 of file OSDLOpenGL.h.


Variable Documentation

Mask used for OpenGL RGBA color specification for alpha, depending on the endianness of the local machine.

Definition at line 140 of file OSDLOpenGL.cc.

Referenced by OSDL::Video::Pixels::getRecommendedColorMasks(), and OSDL::Video::OpenGL::GLTexture::setUpInternalSurfaceFrom().

Mask used for OpenGL RGBA color specification for blue, depending on the endianness of the local machine.

Definition at line 139 of file OSDLOpenGL.cc.

Referenced by OSDL::Video::Pixels::getRecommendedColorMasks(), and OSDL::Video::OpenGL::GLTexture::setUpInternalSurfaceFrom().

Mask used for OpenGL RGBA color specification for green, depending on the endianness of the local machine.

Definition at line 138 of file OSDLOpenGL.cc.

Referenced by OSDL::Video::Pixels::getRecommendedColorMasks(), and OSDL::Video::OpenGL::GLTexture::setUpInternalSurfaceFrom().

Mask used for OpenGL RGBA color specification for red, depending on the endianness of the local machine.

Definition at line 137 of file OSDLOpenGL.cc.

Referenced by OSDL::Video::Pixels::getRecommendedColorMasks(), and OSDL::Video::OpenGL::GLTexture::setUpInternalSurfaceFrom().

Generated on Mon Nov 29 14:06:08 2010 for OSDL by  doxygen 1.6.3