Description
Rendering classes and functions
Library containing classes and functions for 2D and 3D rendering. This library serves as an abstraction layer for a low-level graphics library (OpenGL,OpenGL ES 2.0).
Namespaces
Classes
Enumerations
|
|
|
|
enum |
TexUnitUsageParameter {GENERAL_PURPOSE, TEXTURE_MAPPING, DISABLED} Determines the intended usage of a texture bound to a texture unit. |
|
|
enum |
TextureType {TEXTURE_1D, TEXTURE_1D_ARRAY, TEXTURE_2D, TEXTURE_2D_ARRAY, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_CUBE_MAP_ARRAY, TEXTURE_BUFFER, TEXTURE_2D_MULTISAMPLE} |
Typedefs
Variables
Functions
|
|
|
|
void |
drawAbsBox( RenderingContext & rc, const Geometry::Box & box) |
|
|
void |
drawAbsBox( RenderingContext & rc, const Geometry::Box & box, const Util::Color4f & color) |
|
|
void |
drawAbsWireframeBox( RenderingContext & rc, const Geometry::Box & box) |
|
|
void |
drawAbsWireframeBox( RenderingContext & rc, const Geometry::Box & box, const Util::Color4f & color) |
|
|
void |
drawBox( RenderingContext & rc, const Geometry::Box & box) |
|
|
void |
drawBox( RenderingContext & rc, const Geometry::Box & box, const Util::Color4f & color) |
|
|
void |
drawWireframeBox( RenderingContext & rc, const Geometry::Box & box) |
|
|
void |
drawWireframeBox( RenderingContext & rc, const Geometry::Box & box, const Util::Color4f & color) |
|
|
void |
drawWireframeSphere( RenderingContext & rc, const Geometry::Sphere & sphere) |
|
|
void |
drawWireframeSphere( RenderingContext & rc, const Geometry::Sphere & sphere, const Util::Color4f & color) |
|
|
void |
drawFastAbsBox( RenderingContext & rc, const Geometry::Box & box) |
|
|
void |
drawFullScreenRect( RenderingContext & rc) |
|
|
void |
drawQuad( RenderingContext & rc, const Geometry::Vec3f & lowerLeft, const Geometry::Vec3f & lowerRight, const Geometry::Vec3f & upperRight, const Geometry::Vec3f & upperLeft) |
|
|
void |
drawQuad( RenderingContext & rc, const Geometry::Vec3f & lowerLeft, const Geometry::Vec3f & lowerRight, const Geometry::Vec3f & upperRight, const Geometry::Vec3f & upperLeft, const Util::Color4f & color) |
|
|
void |
drawWireframeRect( RenderingContext & rc, const Geometry::Rect & rect) |
|
|
void |
drawWireframeRect( RenderingContext & rc, const Geometry::Rect & rect, const Util::Color4f & color) |
|
|
void |
drawRect( RenderingContext & rc, const Geometry::Rect & rect) |
|
|
void |
drawRect( RenderingContext & rc, const Geometry::Rect & rect, const Util::Color4f & color) |
|
|
void |
drawWireframeCircle( RenderingContext & rc, const Geometry::Vec2f & center, float radius) |
|
|
void |
drawWireframeCircle( RenderingContext & rc, const Geometry::Vec2f & center, float radius, const Util::Color4f & color) |
|
|
void |
drawTriangle( RenderingContext & rc, const Geometry::Vec3f & vertexA, const Geometry::Vec3f & vertexB, const Geometry::Vec3f & vertexC) |
|
|
void |
drawVector( RenderingContext & rc, const Geometry::Vec3f & from, const Geometry::Vec3f & to) |
|
|
void |
drawVector( RenderingContext & rc, const Geometry::Vec3f & from, const Geometry::Vec3f & to, const Util::Color4f & color) |
|
|
void |
drawVector( RenderingContext & rc, const Geometry::Vec3f & from, const Geometry::Vec3f & to, const Util::Color4f & color1, const Util::Color4f & color2) |
|
|
void |
enable2DMode( RenderingContext & rc) |
|
|
void |
enable2DMode( RenderingContext & rc, const Geometry::Rect_i & screenRect) |
|
|
void |
disable2DMode( RenderingContext & rc) Reset the projection and modelview matrices to the state before the last call to enable2DMode() . |
|
|
void |
enableInstanceBuffer( RenderingContext & rc, BufferObject & instanceBuffer, int32_t location, uint32_t elements) |
|
|
void |
disableInstanceBuffer( RenderingContext & rc, BufferObject & instanceBuffer, int32_t location, uint32_t elements) |
|
|
void |
drawInstances( RenderingContext & rc, Mesh * m, uint32_t firstElement, uint32_t elementCount, uint32_t instanceCount) |
|
|
void |
drawCamera( RenderingContext & rc, const Util::Color4f & color) Draw a symbolized camera using the given rendering context, and color. |
|
|
void |
drawCoordSys( RenderingContext & rc, float scale) |
|
|
void |
drawFrustum( RenderingContext & rc, const Geometry::Frustum & frustum, const Util::Color4f & color, float lineWidth) Draw the given frustum as lines using the given rendering context, color, and line width. |
|
|
void |
drawGrid( RenderingContext & rc, float scale) |
|
|
void |
enableGLErrorChecking() |
|
|
void |
disableGLErrorChecking() |
|
|
void |
checkGLError(const char * file, int line) |
|
|
const char * |
getGLTypeString(uint32_t type) |
|
|
uint32_t |
getGLTypeSize(uint32_t type) |
|
|
uint32_t |
getGLType( Util::TypeConstant type) |
|
|
Util::TypeConstant |
getAttributeType(uint32_t glType) |
|
|
void |
outputGLInformation(std::ostream & output) |
|
|
const char * |
getGraphicsLanguageVersion() |
|
|
const char * |
getShadingLanguageVersion() |
|
|
bool |
isExtensionSupported(const char * extension) |
|
|
float |
readDepthValue(int32_t x, int32_t y) |
|
|
void |
enableDebugOutput() |
|
|
void |
disableDebugOutput() |
|
|
void |
pushDebugGroup(const std::string & name) |
|
|
void |
popDebugGroup() |
|
|
void |
triggerCapture() |
|
|
void |
startCapture() |
|
|
void |
endCapture() |
Documentation
enum
Rendering::TexUnitUsageParameter
Enumerator |
|
Description |
Enumerator |
|
Description |
GENERAL_PURPOSE |
|
The texture is not used for texturing. When using legacy OpenGL, the corresponding state is disabled (see, e.g., the parameterGL_TEXTURE_2D ofglDisable ) for the corresponding unit (seeglActiveTexture ). If a shader is used, the corresponding uniformsg_textureEnabled [unit] is set tofalse . |
TEXTURE_MAPPING |
|
The texture is used for texturing mapping using per vertex texture coordinates. When using legacy OpenGL, the corresponding state is enabled (see the parameterGL_TEXTURE_1D/2D/3D ofglEnable ) for the corresponding unit (seeglActiveTexture ). If a shader is used, the corresponding uniformsg_textureEnabled [unit] is set totrue . |
DISABLED |
|
No Texture is bound to the texture unit. |
Determines the intended usage of a texture bound to a texture unit.
Defined in Rendering/RenderingContext/RenderingParameters.h:1059
enum
Rendering::TextureType
Enumerator |
|
Description |
Enumerator |
|
Description |
TEXTURE_1D |
= 0 |
|
TEXTURE_1D_ARRAY |
= 1 |
|
TEXTURE_2D |
= 2 |
|
TEXTURE_2D_ARRAY |
= 3 |
|
TEXTURE_3D |
= 4 |
|
TEXTURE_CUBE_MAP |
= 5 |
|
TEXTURE_CUBE_MAP_ARRAY |
= 6 |
|
TEXTURE_BUFFER |
= 7 |
|
TEXTURE_2D_MULTISAMPLE |
= 8 |
|
A Texture ‘s type. (Corresponds to ‘glTextureType’, but the actual value is independent from OpenGL.
Note: Value assignment must never change! (they may be used for serialization)
Defined in Rendering/Texture/TextureType.h:20
typedef
Rendering::CountedBufferObject
Defined in Rendering/BufferObject.h:177
typedef
Rendering::VertexAttribute
Defined in Rendering/Mesh/VertexAttribute.h:17
variable
Rendering::MAX_CLIP_PLANES
Defined in Rendering/RenderingContext/RenderingParameters.h:314
variable
Rendering::MAX_BOUND_IMAGES
Defined in Rendering/RenderingContext/RenderingParameters.h:529
variable
Rendering::MAX_TEXTURES
Defined in Rendering/RenderingContext/RenderingParameters.h:1081
function
Rendering::drawAbsBox
Defined in Rendering/Draw.h:62
function
Rendering::drawAbsBox
Defined in Rendering/Draw.h:63
function
Rendering::drawAbsWireframeBox
Defined in Rendering/Draw.h:64
function
Rendering::drawAbsWireframeBox
Defined in Rendering/Draw.h:65
function
Rendering::drawBox
Defined in Rendering/Draw.h:66
function
Rendering::drawBox
Defined in Rendering/Draw.h:67
function
Rendering::drawWireframeBox
Defined in Rendering/Draw.h:68
function
Rendering::drawWireframeBox
Defined in Rendering/Draw.h:69
function
Rendering::drawWireframeSphere
Defined in Rendering/Draw.h:70
function
Rendering::drawWireframeSphere
Defined in Rendering/Draw.h:71
function
Rendering::drawFastAbsBox
Note: Because OpenGL immediate mode is used inside this function, the caller has to make sure that RenderingContext::applyChanges() is called before.
Defined in Rendering/Draw.h:77
function
Rendering::drawFullScreenRect
Defined in Rendering/Draw.h:80
function
Rendering::drawQuad
Draw a quadrilateral in three-dimensional space. The quadrilateral is given by four points. Positions, normals and texture coordinates are generated for the vertices.
Defined in Rendering/Draw.h:86
function
Rendering::drawQuad
Set the current color and draw a quadrilateral in three-dimensional space.
See also: drawQuad
Defined in Rendering/Draw.h:92
function
Rendering::drawWireframeRect
Defined in Rendering/Draw.h:94
function
Rendering::drawWireframeRect
Defined in Rendering/Draw.h:95
function
Rendering::drawRect
Defined in Rendering/Draw.h:97
function
Rendering::drawRect
Defined in Rendering/Draw.h:98
function
Rendering::drawWireframeCircle
Defined in Rendering/Draw.h:100
function
Rendering::drawWireframeCircle
Defined in Rendering/Draw.h:101
function
Rendering::drawTriangle
Draw a triangle in three-dimensional space. The triangle is given by three points. Positions are generated for the vertices only.
Defined in Rendering/Draw.h:108
function
Rendering::drawVector
Defined in Rendering/Draw.h:110
function
Rendering::drawVector
Defined in Rendering/Draw.h:111
function
Rendering::drawVector
Defined in Rendering/Draw.h:112
function
Rendering::enable2DMode
Set the projection and modelview matrices to enable drawing in screen space.
Note: The state before the call is saved. Call disable2DMode() to restore it.
Defined in Rendering/Draw.h:119
function
Rendering::enable2DMode
Defined in Rendering/Draw.h:120
function
Rendering::disable2DMode
Reset the projection and modelview matrices to the state before the last call to enable2DMode() .
Defined in Rendering/Draw.h:123
function
Rendering::enableInstanceBuffer
Defined in Rendering/Draw.h:125
function
Rendering::disableInstanceBuffer
Defined in Rendering/Draw.h:126
function
Rendering::drawInstances
Defined in Rendering/Draw.h:127
function
Rendering::drawCamera
Draw a symbolized camera using the given rendering context, and color.
Defined in Rendering/DrawCompound.h:37
function
Rendering::drawCoordSys
Defined in Rendering/DrawCompound.h:39
function
Rendering::drawFrustum
Draw the given frustum as lines using the given rendering context, color, and line width.
Defined in Rendering/DrawCompound.h:42
function
Rendering::drawGrid
Defined in Rendering/DrawCompound.h:44
function
Rendering::enableGLErrorChecking
Defined in Rendering/Helper.h:27
function
Rendering::disableGLErrorChecking
Defined in Rendering/Helper.h:28
function
Rendering::checkGLError
Defined in Rendering/Helper.h:29
function
Rendering::getGLTypeString
Return a human-readable description for the given OpenGL type.
Parameters
- type
- Valid values are GL_BOOL, GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, and GL_DOUBLE.
Returns
String description of the type, or an empty string if the type is invalid.
Defined in Rendering/Helper.h:37
function
Rendering::getGLTypeSize
Return the size of the given OpenGL type.
Parameters
- type
- Valid values are GL_BOOL, GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, and GL_DOUBLE.
Returns
Size in bytes, or zero if the type is invalid.
Defined in Rendering/Helper.h:45
function
Rendering::getGLType
Returns the OpenGL type for the given resource attribute type.
Parameters
- type
- the attribute type (e.g., TypeConstant).
Returns
The corresponding OpenGL type constant.
Defined in Rendering/Helper.h:53
function
Rendering::getAttributeType
Returns the resource attribute type for the given OpenGL type.
Parameters
- type
- the OpenGL type.
Returns
The corresponding attribute type.
Defined in Rendering/Helper.h:61
function
Rendering::outputGLInformation
Write information about the current OpenGL context to the given stream.
Parameters
- output
- Output stream that the data is written to
See also: glGetString
Defined in Rendering/Helper.h:69
function
Rendering::getGraphicsLanguageVersion
Return the supported graphics language version.
Returns
Null-terminated string containing the supported graphics language version
See also: constantGL_VERSION
of functionglGetString
See also: glewIsSupported
Defined in Rendering/Helper.h:78
function
Rendering::getShadingLanguageVersion
Return the supported shading language version.
Returns
Null-terminated string containing the supported shading language version
See also: constantGL_SHADING_LANGUAGE_VERSION
of functionglGetString
Defined in Rendering/Helper.h:86
function
Rendering::isExtensionSupported
Check for support of a specific OpenGL extension.
Parameters
- extension
- Null-terminated string containing the name of the requested extension
Returns
true
if the requested extension is supported,false
otherwise.
See also: glewIsSupported
Defined in Rendering/Helper.h:95
function
Rendering::readDepthValue
Read a single value from the depth buffer.
See also: glReadPixels
Defined in Rendering/Helper.h:102
function
Rendering::enableDebugOutput
Enable debug output that can be used to find errors or performance problems.
See also: OpenGL extensionGL_ARB_debug_output
Defined in Rendering/Helper.h:109
function
Rendering::disableDebugOutput
Disable the debug output again.
See also: enableDebugOutput()
Defined in Rendering/Helper.h:116
function
Rendering::pushDebugGroup
Push a named debug group into the command stream
Parameters
- name
- Name of the debug group
See also: glPushDebugGroup
Defined in Rendering/Helper.h:124
function
Rendering::popDebugGroup
Pop the active debug group
See also: glPopDebugGroup
Defined in Rendering/Helper.h:130
function
Rendering::triggerCapture
Triggers a capture of the current GL state in RenderDoc.
Note: Requires RenderDoc
Defined in Rendering/Helper.h:136
function
Rendering::startCapture
Starts capturing of the GL state in RenderDoc.
Note: Requires RenderDoc
Defined in Rendering/Helper.h:142
function
Rendering::endCapture
Ends the active capture.
Note: Requires RenderDoc
Defined in Rendering/Helper.h:148