H3D API
2.4.1
|
The GraphicsHardwareInfo class provides information about the graphics hardware the program is being run on and its capabilities. More...
#include <H3D/GraphicsHardwareInfo.h>
Classes | |
struct | Info |
The Info class holds information about the current graphics hardware. More... | |
Public Member Functions | |
GraphicsHardwareInfo (Inst< SFNode > _metadata=0, Inst< SFBool > _initialized=0, Inst< SFString > _vendor=0, Inst< SFString > _renderer=0, Inst< SFString > _version=0, Inst< SFString > _shadingLanguageVersion=0, Inst< SFString > _extensions=0, Inst< SFInt32 > _max3dTextureSize=0, Inst< SFInt32 > _maxClientAttribStackDepth=0, Inst< SFInt32 > _maxAttribStackDepth=0, Inst< SFInt32 > _maxClipPlanes=0, Inst< SFInt32 > _maxColorMatrixStackDepth=0, Inst< SFInt32 > _maxCombinedTextureImageUnits=0, Inst< SFInt32 > _maxCubeMapTextureSize=0, Inst< SFInt32 > _maxDrawBuffers=0, Inst< SFInt32 > _maxElementsIndices=0, Inst< SFInt32 > _maxElementsVertices=0, Inst< SFInt32 > _maxEvalOrder=0, Inst< SFInt32 > _maxFragmentUniformComponents=0, Inst< SFInt32 > _maxLights=0, Inst< SFInt32 > _maxListNesting=0, Inst< SFInt32 > _maxModelviewStackDepth=0, Inst< SFInt32 > _maxNameStackDepth=0, Inst< SFInt32 > _maxPixelMapTable=0, Inst< SFInt32 > _maxProjectionStackDepth=0, Inst< SFInt32 > _maxTextureCoords=0, Inst< SFInt32 > _maxTextureImageUnits=0, Inst< SFInt32 > _maxTextureLODBias=0, Inst< SFInt32 > _maxTextureSize=0, Inst< SFInt32 > _maxTextureStackDepth=0, Inst< SFInt32 > _maxTextureUnits=0, Inst< SFInt32 > _maxVaryingFloats=0, Inst< SFInt32 > _maxVertexAttribs=0, Inst< SFInt32 > _maxVertexTextureImageUnits=0, Inst< SFInt32 > _maxVertexUniformComponents=0, Inst< SFInt32 > _maxViewportWidth=0, Inst< SFInt32 > _maxViewportHeight=0) | |
Constructor. | |
virtual | ~GraphicsHardwareInfo () |
Destructor. | |
virtual void | initialize () |
Initialize the node. Sets the fields of the node. | |
![]() | |
X3DChildNode (Inst< SFNode > _metadata=0) | |
Constructor. | |
![]() | |
X3DNode (Inst< SFNode > _metadata=0) | |
Constructor. | |
X3DMetadataObject * | getMetadataByName (const string &_name) |
Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More... | |
![]() | |
Node () | |
Constructor. | |
virtual Node * | clone (bool deepCopy=true, DeepCopyMap *deepCopyMap=NULL) |
Returns a new instance of this node type with the same state as this one. More... | |
virtual | ~Node () |
Destructor. | |
X3DPrototypeInstance * | getProtoInstanceParent () |
If this node is the root node in the proto body of a X3DPrototypeInstance then this will return that node. More... | |
void | setProtoInstanceParent (X3DPrototypeInstance *p) |
Set the X3DPrototypeInstance this node is the the root node if applicaple. | |
virtual void | render () |
the render() function is used for the depth-first rendering traversal of the scene-graph. More... | |
virtual void | traverseSG (TraverseInfo &ti) |
traverseSG is called once per scenegraph loop on the scene in order to traverse the scenegraph. More... | |
virtual bool | lineIntersect (const Vec3f &from, const Vec3f &to, LineIntersectResult &result) |
Detect intersection between a line segment and the Node. More... | |
virtual void | closestPoint (const Vec3f &p, NodeIntersectResult &result) |
Find closest point on Node to p. More... | |
virtual bool | movingSphereIntersect (H3DFloat radius, const Vec3f &from, const Vec3f &to, NodeIntersectResult &result) |
Detect collision between a moving sphere and the Node. More... | |
virtual string | defaultXMLContainerField () |
Returns the default xml containerField attribute value. More... | |
virtual Field * | getField (const string &_name) const |
return a pointer to the field specified by name within this instance | |
int | addDestructCallback (void(*func)(Node *, void *), void *args) |
Add a callback function to be run on destruction of node. More... | |
int | removeDestructCallback (void(*func)(Node *, void *), void *args) |
Add a callback function to be run on destruction of node. More... | |
Static Public Member Functions | |
static bool | initializeInfo () |
Function to call to initialize the static info struct with the values from the current graphics hardware. More... | |
static bool | infoIsInitialized () |
Returns true if the static info member has been initialized or not. | |
static const Info & | getInfo () |
Returns info about the current graphics hardware. More... | |
![]() | |
static unsigned int | nrNodesAlive () |
Returns the nr of nodes currently alive, i.e. nodes created but not destructed. | |
static int | nrNodesCreated () |
Returns the number of nodes created in total since the start of the program. | |
Public Attributes | |
H3DUniquePtr< SFBool > | initialized |
If true the information in all the other fields are valid. More... | |
H3DUniquePtr< SFString > | vendor |
The company responsible for this GL implementation. More... | |
H3DUniquePtr< SFString > | renderer |
The name of the renderer. More... | |
H3DUniquePtr< SFString > | version |
A version or release number. More... | |
H3DUniquePtr< SFString > | shadingLanguageVersion |
A version or release number for the shading language. More... | |
H3DUniquePtr< SFString > | extensions |
A space-separated list of supported extensions to GL. More... | |
H3DUniquePtr< SFInt32 > | max3dTextureSize |
A rough estimate of the largest 3D texture that the GL can handle. More... | |
H3DUniquePtr< SFInt32 > | maxClientAttribStackDepth |
A value indicating the maximum supported depth of the client attribute stack. More... | |
H3DUniquePtr< SFInt32 > | maxAttribStackDepth |
The maximum supported depth of the attribute stack. More... | |
H3DUniquePtr< SFInt32 > | maxClipPlanes |
The maximum number of application-defined clipping planes. More... | |
H3DUniquePtr< SFInt32 > | maxColorMatrixStackDepth |
The maximum supported depth of the color matrix stack. More... | |
H3DUniquePtr< SFInt32 > | maxCombinedTextureImageUnits |
The maximum supported texture image units that can be used to access texture maps from the vertex shader and the fragment processor combined. More... | |
H3DUniquePtr< SFInt32 > | maxCubeMapTextureSize |
The value gives a rough estimate of the largest cube-map texture that the GL can handle. More... | |
H3DUniquePtr< SFInt32 > | maxDrawBuffers |
The maximum number of simultaneous output colors allowed from a fragment shader using the gl_FragData built-in array. More... | |
H3DUniquePtr< SFInt32 > | maxElementsIndices |
The recommended maximum number of vertex array indices. More... | |
H3DUniquePtr< SFInt32 > | maxElementsVertices |
The recommended maximum number of vertex array vertices. More... | |
H3DUniquePtr< SFInt32 > | maxEvalOrder |
The maximum equation order supported by 1D and 2D evaluators. More... | |
H3DUniquePtr< SFInt32 > | maxFragmentUniformComponents |
The maximum number of individual floating-point, integer, or boolean values that can be held in uniform variable storage for a fragment shader. More... | |
H3DUniquePtr< SFInt32 > | maxLights |
The maximum number of lights. More... | |
H3DUniquePtr< SFInt32 > | maxListNesting |
The maximum recursion depth allowed during display-list traversal. More... | |
H3DUniquePtr< SFInt32 > | maxModelviewStackDepth |
The maximum supported depth of the modelview matrix stack. More... | |
H3DUniquePtr< SFInt32 > | maxNameStackDepth |
The maximum supported depth of the selection name stack. More... | |
H3DUniquePtr< SFInt32 > | maxPixelMapTable |
The maximum supported size of a glPixelMap lookup table. More... | |
H3DUniquePtr< SFInt32 > | maxProjectionStackDepth |
The maximum supported depth of the projection matrix stack. More... | |
H3DUniquePtr< SFInt32 > | maxTextureCoords |
The maximum number of texture coordinate sets available to vertex and fragment shaders. More... | |
H3DUniquePtr< SFInt32 > | maxTextureImageUnits |
The maximum supported texture image units that can be used to access texture maps from the fragment shader. More... | |
H3DUniquePtr< SFInt32 > | maxTextureLODBias |
The maximum, absolute value of the texture level-of-detail bias. More... | |
H3DUniquePtr< SFInt32 > | maxTextureSize |
The value gives a rough estimate of the largest texture that the GL can handle. More... | |
H3DUniquePtr< SFInt32 > | maxTextureStackDepth |
The maximum supported depth of the texture matrix stack. More... | |
H3DUniquePtr< SFInt32 > | maxTextureUnits |
A value indicating the number of conventional texture units supported. More... | |
H3DUniquePtr< SFInt32 > | maxVaryingFloats |
The maximum number of interpolators available for processing varying variables used by vertex and fragment shaders. More... | |
H3DUniquePtr< SFInt32 > | maxVertexAttribs |
The maximum number of 4-component generic vertex attributes accessible to a vertex shader. More... | |
H3DUniquePtr< SFInt32 > | maxVertexTextureImageUnits |
The maximum supported texture image units that can be used to access texture maps from the vertex shader. More... | |
H3DUniquePtr< SFInt32 > | maxVertexUniformComponents |
The maximum number of individual floating-point, integer, or boolean values that can be held in uniform variable storage for a vertex shader. More... | |
H3DUniquePtr< SFInt32 > | maxViewportWidth |
The maximum supported width of the viewport. More... | |
H3DUniquePtr< SFInt32 > | maxViewportHeight |
The maximum supported height of the viewport. More... | |
![]() | |
H3DUniquePtr< SFNode > | metadata |
Meta data about the node. More... | |
Static Public Attributes | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
![]() | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
Static Protected Attributes | |
static bool | info_initialized = false |
Flag indicating if the info member has been initialized or not. | |
static Info | info |
The graphics card info for the current system. | |
Additional Inherited Members | |
![]() | |
typedef std::map< Node *, Node * > | DeepCopyMap |
A map type used during a deep copy clone() to map from original nodes to cloned nodes. | |
![]() | |
void | cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap) |
A helper function for the clone() method. More... | |
![]() | |
static Node * | getClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap) |
A helper function for nodes that implement clone() More... | |
The GraphicsHardwareInfo class provides information about the graphics hardware the program is being run on and its capabilities.
One can either use the GraphicsHardwareInfo node to get the info or use the static function GraphicsHardwareInfo::getInfo directly.
The values are the same as can be get by the glGet function. See OpenGL reference documentation for that.
Examples:
|
inlinestatic |
Returns info about the current graphics hardware.
Only valid if infoIsInitialized is true.
Referenced by H3D::PhongShader::addUniformFieldsForLight(), H3D::PhongShader::setupLight(), H3D::Appearance::traverseSG(), H3D::PhongShader::traverseSG(), and H3D::FrameBufferTextureGenerator::GetNrSamples::update().
|
static |
Function to call to initialize the static info struct with the values from the current graphics hardware.
Can only be called when a valid current OpenGL context exits.
References info.
Referenced by H3D::H3DWindowNode::initialize().
H3DUniquePtr< SFString > H3D::GraphicsHardwareInfo::extensions |
A space-separated list of supported extensions to GL.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFBool > H3D::GraphicsHardwareInfo::initialized |
If true the information in all the other fields are valid.
Access type: outputOnly
Default value: FALSE
Referenced by GraphicsHardwareInfo(), and initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::max3dTextureSize |
A rough estimate of the largest 3D texture that the GL can handle.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxAttribStackDepth |
The maximum supported depth of the attribute stack.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxClientAttribStackDepth |
A value indicating the maximum supported depth of the client attribute stack.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxClipPlanes |
The maximum number of application-defined clipping planes.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxColorMatrixStackDepth |
The maximum supported depth of the color matrix stack.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxCombinedTextureImageUnits |
The maximum supported texture image units that can be used to access texture maps from the vertex shader and the fragment processor combined.
If both the vertex shader and the fragment processing stage access the same texture image unit, then that counts as using two texture image units against this limit.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxCubeMapTextureSize |
The value gives a rough estimate of the largest cube-map texture that the GL can handle.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxDrawBuffers |
The maximum number of simultaneous output colors allowed from a fragment shader using the gl_FragData built-in array.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxElementsIndices |
The recommended maximum number of vertex array indices.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxElementsVertices |
The recommended maximum number of vertex array vertices.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxEvalOrder |
The maximum equation order supported by 1D and 2D evaluators.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxFragmentUniformComponents |
The maximum number of individual floating-point, integer, or boolean values that can be held in uniform variable storage for a fragment shader.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxLights |
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxListNesting |
The maximum recursion depth allowed during display-list traversal.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxModelviewStackDepth |
The maximum supported depth of the modelview matrix stack.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxNameStackDepth |
The maximum supported depth of the selection name stack.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxPixelMapTable |
The maximum supported size of a glPixelMap lookup table.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxProjectionStackDepth |
The maximum supported depth of the projection matrix stack.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxTextureCoords |
The maximum number of texture coordinate sets available to vertex and fragment shaders.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxTextureImageUnits |
The maximum supported texture image units that can be used to access texture maps from the fragment shader.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxTextureLODBias |
The maximum, absolute value of the texture level-of-detail bias.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxTextureSize |
The value gives a rough estimate of the largest texture that the GL can handle.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxTextureStackDepth |
The maximum supported depth of the texture matrix stack.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxTextureUnits |
A value indicating the number of conventional texture units supported.
Each conventional texture unit includes both a texture coordinate set and a texture image unit. Conventional texture units may be used for fixed-function (non-shader) rendering.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxVaryingFloats |
The maximum number of interpolators available for processing varying variables used by vertex and fragment shaders.
This value represents the number of individual floating-point values that can be interpolated; varying variables declared as vectors, matrices, and arrays will all consume multiple interpolators.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxVertexAttribs |
The maximum number of 4-component generic vertex attributes accessible to a vertex shader.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxVertexTextureImageUnits |
The maximum supported texture image units that can be used to access texture maps from the vertex shader.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxVertexUniformComponents |
The maximum number of individual floating-point, integer, or boolean values that can be held in uniform variable storage for a vertex shader.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxViewportHeight |
H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxViewportWidth |
H3DUniquePtr< SFString > H3D::GraphicsHardwareInfo::renderer |
The name of the renderer.
This name is typically specific to a particular configuration of a hardware platform. It does not change from release to release.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFString > H3D::GraphicsHardwareInfo::shadingLanguageVersion |
A version or release number for the shading language.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFString > H3D::GraphicsHardwareInfo::vendor |
The company responsible for this GL implementation.
This name does not change from release to release.
Access type: outputOnly
Referenced by initialize().
H3DUniquePtr< SFString > H3D::GraphicsHardwareInfo::version |