H3D API  2.4.1
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Attributes | List of all members
H3D::GraphicsHardwareInfo Class Reference

The GraphicsHardwareInfo class provides information about the graphics hardware the program is being run on and its capabilities. More...

#include <H3D/GraphicsHardwareInfo.h>

Inheritance diagram for H3D::GraphicsHardwareInfo:
Inheritance graph

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.
 
- Public Member Functions inherited from H3D::X3DChildNode
 X3DChildNode (Inst< SFNode > _metadata=0)
 Constructor.
 
- Public Member Functions inherited from H3D::X3DNode
 X3DNode (Inst< SFNode > _metadata=0)
 Constructor.
 
X3DMetadataObjectgetMetadataByName (const string &_name)
 Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More...
 
- Public Member Functions inherited from H3D::Node
 Node ()
 Constructor.
 
virtual Nodeclone (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.
 
X3DPrototypeInstancegetProtoInstanceParent ()
 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 FieldgetField (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 InfogetInfo ()
 Returns info about the current graphics hardware. More...
 
- Static Public Member Functions inherited from H3D::Node
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< SFBoolinitialized
 If true the information in all the other fields are valid. More...
 
H3DUniquePtr< SFStringvendor
 The company responsible for this GL implementation. More...
 
H3DUniquePtr< SFStringrenderer
 The name of the renderer. More...
 
H3DUniquePtr< SFStringversion
 A version or release number. More...
 
H3DUniquePtr< SFStringshadingLanguageVersion
 A version or release number for the shading language. More...
 
H3DUniquePtr< SFStringextensions
 A space-separated list of supported extensions to GL. More...
 
H3DUniquePtr< SFInt32max3dTextureSize
 A rough estimate of the largest 3D texture that the GL can handle. More...
 
H3DUniquePtr< SFInt32maxClientAttribStackDepth
 A value indicating the maximum supported depth of the client attribute stack. More...
 
H3DUniquePtr< SFInt32maxAttribStackDepth
 The maximum supported depth of the attribute stack. More...
 
H3DUniquePtr< SFInt32maxClipPlanes
 The maximum number of application-defined clipping planes. More...
 
H3DUniquePtr< SFInt32maxColorMatrixStackDepth
 The maximum supported depth of the color matrix stack. More...
 
H3DUniquePtr< SFInt32maxCombinedTextureImageUnits
 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< SFInt32maxCubeMapTextureSize
 The value gives a rough estimate of the largest cube-map texture that the GL can handle. More...
 
H3DUniquePtr< SFInt32maxDrawBuffers
 The maximum number of simultaneous output colors allowed from a fragment shader using the gl_FragData built-in array. More...
 
H3DUniquePtr< SFInt32maxElementsIndices
 The recommended maximum number of vertex array indices. More...
 
H3DUniquePtr< SFInt32maxElementsVertices
 The recommended maximum number of vertex array vertices. More...
 
H3DUniquePtr< SFInt32maxEvalOrder
 The maximum equation order supported by 1D and 2D evaluators. More...
 
H3DUniquePtr< SFInt32maxFragmentUniformComponents
 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< SFInt32maxLights
 The maximum number of lights. More...
 
H3DUniquePtr< SFInt32maxListNesting
 The maximum recursion depth allowed during display-list traversal. More...
 
H3DUniquePtr< SFInt32maxModelviewStackDepth
 The maximum supported depth of the modelview matrix stack. More...
 
H3DUniquePtr< SFInt32maxNameStackDepth
 The maximum supported depth of the selection name stack. More...
 
H3DUniquePtr< SFInt32maxPixelMapTable
 The maximum supported size of a glPixelMap lookup table. More...
 
H3DUniquePtr< SFInt32maxProjectionStackDepth
 The maximum supported depth of the projection matrix stack. More...
 
H3DUniquePtr< SFInt32maxTextureCoords
 The maximum number of texture coordinate sets available to vertex and fragment shaders. More...
 
H3DUniquePtr< SFInt32maxTextureImageUnits
 The maximum supported texture image units that can be used to access texture maps from the fragment shader. More...
 
H3DUniquePtr< SFInt32maxTextureLODBias
 The maximum, absolute value of the texture level-of-detail bias. More...
 
H3DUniquePtr< SFInt32maxTextureSize
 The value gives a rough estimate of the largest texture that the GL can handle. More...
 
H3DUniquePtr< SFInt32maxTextureStackDepth
 The maximum supported depth of the texture matrix stack. More...
 
H3DUniquePtr< SFInt32maxTextureUnits
 A value indicating the number of conventional texture units supported. More...
 
H3DUniquePtr< SFInt32maxVaryingFloats
 The maximum number of interpolators available for processing varying variables used by vertex and fragment shaders. More...
 
H3DUniquePtr< SFInt32maxVertexAttribs
 The maximum number of 4-component generic vertex attributes accessible to a vertex shader. More...
 
H3DUniquePtr< SFInt32maxVertexTextureImageUnits
 The maximum supported texture image units that can be used to access texture maps from the vertex shader. More...
 
H3DUniquePtr< SFInt32maxVertexUniformComponents
 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< SFInt32maxViewportWidth
 The maximum supported width of the viewport. More...
 
H3DUniquePtr< SFInt32maxViewportHeight
 The maximum supported height of the viewport. More...
 
- Public Attributes inherited from H3D::X3DNode
H3DUniquePtr< SFNodemetadata
 Meta data about the node. More...
 

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 
- Static Public Attributes inherited from H3D::X3DNode
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

- Public Types inherited from H3D::Node
typedef std::map< Node *, Node * > DeepCopyMap
 A map type used during a deep copy clone() to map from original nodes to cloned nodes.
 
- Protected Member Functions inherited from H3D::Node
void cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for the clone() method. More...
 
- Static Protected Member Functions inherited from H3D::Node
static NodegetClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for nodes that implement clone() More...
 

Detailed Description

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:

Internal routes:

Member Function Documentation

◆ getInfo()

static const Info& H3D::GraphicsHardwareInfo::getInfo ( )
inlinestatic

◆ initializeInfo()

bool GraphicsHardwareInfo::initializeInfo ( )
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().

Member Data Documentation

◆ extensions

H3DUniquePtr< SFString > H3D::GraphicsHardwareInfo::extensions

A space-separated list of supported extensions to GL.

Access type: outputOnly

Referenced by initialize().

◆ initialized

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().

◆ max3dTextureSize

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::max3dTextureSize

A rough estimate of the largest 3D texture that the GL can handle.

Access type: outputOnly

Referenced by initialize().

◆ maxAttribStackDepth

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxAttribStackDepth

The maximum supported depth of the attribute stack.

Access type: outputOnly

Referenced by initialize().

◆ maxClientAttribStackDepth

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxClientAttribStackDepth

A value indicating the maximum supported depth of the client attribute stack.

Access type: outputOnly

Referenced by initialize().

◆ maxClipPlanes

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxClipPlanes

The maximum number of application-defined clipping planes.

Access type: outputOnly

Referenced by initialize().

◆ maxColorMatrixStackDepth

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxColorMatrixStackDepth

The maximum supported depth of the color matrix stack.

Access type: outputOnly

Referenced by initialize().

◆ maxCombinedTextureImageUnits

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().

◆ maxCubeMapTextureSize

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().

◆ maxDrawBuffers

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().

◆ maxElementsIndices

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxElementsIndices

The recommended maximum number of vertex array indices.

Access type: outputOnly

Referenced by initialize().

◆ maxElementsVertices

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxElementsVertices

The recommended maximum number of vertex array vertices.

Access type: outputOnly

Referenced by initialize().

◆ maxEvalOrder

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxEvalOrder

The maximum equation order supported by 1D and 2D evaluators.

Access type: outputOnly

Referenced by initialize().

◆ maxFragmentUniformComponents

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().

◆ maxLights

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxLights

The maximum number of lights.

Access type: outputOnly

Referenced by initialize().

◆ maxListNesting

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxListNesting

The maximum recursion depth allowed during display-list traversal.

Access type: outputOnly

Referenced by initialize().

◆ maxModelviewStackDepth

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxModelviewStackDepth

The maximum supported depth of the modelview matrix stack.

Access type: outputOnly

Referenced by initialize().

◆ maxNameStackDepth

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxNameStackDepth

The maximum supported depth of the selection name stack.

Access type: outputOnly

Referenced by initialize().

◆ maxPixelMapTable

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxPixelMapTable

The maximum supported size of a glPixelMap lookup table.

Access type: outputOnly

Referenced by initialize().

◆ maxProjectionStackDepth

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxProjectionStackDepth

The maximum supported depth of the projection matrix stack.

Access type: outputOnly

Referenced by initialize().

◆ maxTextureCoords

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxTextureCoords

The maximum number of texture coordinate sets available to vertex and fragment shaders.

Access type: outputOnly

Referenced by initialize().

◆ maxTextureImageUnits

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().

◆ maxTextureLODBias

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxTextureLODBias

The maximum, absolute value of the texture level-of-detail bias.

Access type: outputOnly

Referenced by initialize().

◆ maxTextureSize

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().

◆ maxTextureStackDepth

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxTextureStackDepth

The maximum supported depth of the texture matrix stack.

Access type: outputOnly

Referenced by initialize().

◆ maxTextureUnits

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().

◆ maxVaryingFloats

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().

◆ maxVertexAttribs

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().

◆ maxVertexTextureImageUnits

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().

◆ maxVertexUniformComponents

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().

◆ maxViewportHeight

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxViewportHeight

The maximum supported height of the viewport.

Access type: outputOnly

Referenced by initialize().

◆ maxViewportWidth

H3DUniquePtr< SFInt32 > H3D::GraphicsHardwareInfo::maxViewportWidth

The maximum supported width of the viewport.

Access type: outputOnly

Referenced by initialize().

◆ renderer

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().

◆ shadingLanguageVersion

H3DUniquePtr< SFString > H3D::GraphicsHardwareInfo::shadingLanguageVersion

A version or release number for the shading language.

Access type: outputOnly

Referenced by initialize().

◆ vendor

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().

◆ version

H3DUniquePtr< SFString > H3D::GraphicsHardwareInfo::version

A version or release number.

Access type: outputOnly

Referenced by initialize().


The documentation for this class was generated from the following files: