Classes |
| struct | VR3Globals |
| | Global static variables struct. More...
|
Defines |
| #define | VR3EM_NONE 0x0000 |
| | Environment mapping disabled.
|
| #define | VR3EM_DIFFUSE 0x0001 |
| | Environment mapping performed only with diffuse component.
|
| #define | VR3EM_SPECULAR 0x0002 |
| | Environment mapping performed only with diffuse component.
|
| #define | VR3EM_FULL 0x0003 |
| | Full environemnt mapping (recommended when using IBL)
|
| #define | VR3MAT_NOSUB -2 |
| | submaterial identifier that stands for a non-sub material
|
|
| #define | VR3_GL_VERSION_MAJOR "3" |
| | opengl major version to be used (at least 3, version 3.0, is expected)
|
| #define | VR3_GL_VERSION_MINOR "3" |
| | opengl minor version to be used
|
|
| #define | VR3_GLSL_VERSION_MAJOR "3" |
| | GLSL major version to be used (at least 3, version 3.30, is expected)
|
| #define | VR3_GLSL_VERSION_MINOR "30" |
| | opengl minor version to be used
|
|
| #define | VR3BEGFL_KEEPCOLORS 0x0001 |
| | Keep current color buffer.
|
| #define | VR3BEGFL_KEEPLIGHTS 0x0002 |
| | Keep current scene light uniform parameters for shaders.
|
| #define | VR3BEGFL_KEEPMATRICES 0x0004 |
| | Keep current matrices uniform parameters for shaders.
|
| #define | VR3BEGFL_KEEPSHADOWMAPS 0x0008 |
| | Keep current shadow maps in shaders.
|
| #define | VR3BEGFL_KEEPPHYSICS 0x0010 |
| | Keep current physics results.
|
|
| #define | VR3DRAWFL_SHADOWMAP 0x0001 |
| | Draw the shadow map.
|
| #define | VR3DRAWFL_RECEIVESHADOWS 0x0002 |
| | Receive shadows while rendering.
|
| #define | VR3DRAWFL_NOSIMULATE 0x0004 |
| | Avoid simulation data flag.
|
|
| #define | VR3SC_LIGHT 0 |
| | Identifies one of the scene lights.
|
| #define | VR3SC_VF_CULLING 1 |
| | View frustum culling flag.
|
| #define | VR3SC_FACE_CULLING 2 |
| | Backface culling flag.
|
|
| #define | VR3CAM_FREE 0 |
| | Free mode.
|
| #define | VR3CAM_LOOKAT 1 |
| | Lookat mode.
|
|
| #define | VR3LIGHT_AMBIENT 0 |
| | Ambient light color.
|
| #define | VR3LIGHT_DIFFUSE 1 |
| | Diffuse light color.
|
| #define | VR3LIGHT_SPECULAR 2 |
| | Specular light color.
|
|
| #define | VR3SC_NUM_CAMERAS 8 |
| | maximum number of active cameras
|
| #define | VR3SC_NUM_LIGHTS 16 |
| | maximum number of active lights
|
| #define | VR3SC_DEF_ZNEAR 0.1f |
| | default near clipping distance
|
| #define | VR3SC_DEF_ZFAR 1000.0f |
| | default far clipping distance
|
|
| #define | VR3OBJ_NUM_LODS 10 |
| | Maximum number of different level of details for an object.
|
|
| #define | VR3MESH_MAX_VER_ATTRIBS 6 |
| | Maximum number attributes per vertex.
|
| #define | VR3MESH_VER_POS_INDEX 0 |
| | Constant VBO index for vertex positions.
|
| #define | VR3MESH_NORM_INDEX 1 |
| | Constant VBO index for normals.
|
| #define | VR3MESH_DIFF_COORD_INDEX 2 |
| | Constant VBO index for diffuse texture coordinates.
|
| #define | VR3MESH_LIGHT_COORD_INDEX 3 |
| | Constant VBO index for light map coordinates.
|
| #define | VR3MESH_NORM_COORD_INDEX 4 |
| | Constant VBO index for normal map coordinates.
|
| #define | VR3MESH_DISP_COORD_INDEX 5 |
| | Constant VBO index for displacement map coordinates.
|
| #define | VR3MESH_DEF_BI 0.0f |
| | Default bias for displacement mapping.
|
| #define | VR3MESH_DEF_SC 1.0f |
| | Default scale for displacement mapping.
|
| #define | VR3MESH_DEF_TF 4 |
| | Default tessellation factor for displacement mapping.
|
| #define | VR3MESH_MIN_TF 2 |
| | Minimum valid tessellation factor for displacement mapping.
|
|
| #define | VR3BG_VER_POS_INDEX 0 |
| | Constant VBO index for vertex positions.
|
|
| #define | VR3TEXT_VER_POS_INDEX 0 |
| | Constant VBO index for vertex positions.
|
| #define | VR3TEXT_DEF_RESY 32 |
| | Default resolution for loaded text glyphs.
|
| #define | VR3TEXT_DEF_FONT "Times New Roman" |
| | Default font name.
|
| #define | VR3TEXT_DEF_CHARSET ANSI_CHARSET |
| | Default character set.
|
| #define | VR3TEXT_ZDISPLACEMENT 0.0001f |
| | Displacement along the local Z axis of subsequent characters.
|
|
During rendering, many different texture image are accessed in order to obtain color information or something else. We statically bind to a given sampler a certain texture unit. When rendering, the desired proper image will be bound to the unit referenced by the sampler. We require a minimum of VR3TEX_RESERVED_UNITS different units in the GL implementation, more available units may be used for shadow mapping (to a maximum of the implementation limit).
|
| #define | VR3TEX_RESERVED_UNITS 6 |
| | Number of different texture image units required by the VR3Lib.
|
| #define | VR3TEXUNIT_DIFFUSE GL_TEXTURE0 |
| | Texture image unit reserved for Diffuse Mapping.
|
| #define | VR3TEXUNIT_LIGHT GL_TEXTURE1 |
| | Texture image unit reserved for Light Mapping.
|
| #define | VR3TEXUNIT_NORMAL GL_TEXTURE2 |
| | Texture image unit reserved for Normal Mapping.
|
| #define | VR3TEXUNIT_DISPLACEMENT GL_TEXTURE3 |
| | Texture image unit reserved for Displacement Mapping.
|
| #define | VR3TEXUNIT_ENVDIFF GL_TEXTURE4 |
| | Texture image unit reserved for Environment Mapping (diffuse component)
|
| #define | VR3TEXUNIT_ENVSPEC GL_TEXTURE5 |
| | Texture image unit reserved for Environment Mapping (specular component)
|
| #define | VR3TEXUNIT_BACKGROUND GL_TEXTURE0 |
| | Texture image unit reserved for the background texture.
|
| #define | VR3TEXUNIT_BASE_SHADOW (GL_TEXTURE0+VR3TEX_RESERVED_UNITS) |
| | Base texture image unit reserved for shadow mapping.
|
| #define | VR3TEXUNIT_BLUR GL_TEXTURE0 |
| | Texture image unit reserved for blurring.
|
| #define | VR3TEXUNIT_TEXT GL_TEXTURE0 |
| | Texture image unit reserved for text rendering.
|
|
| #define | VR3TEX_2D GL_TEXTURE_2D |
| | Standard 2D texture.
|
| #define | VR3TEX_CUBE_MAP GL_TEXTURE_CUBE_MAP |
| | Cube map.
|
|
| #define | VR3TEX_DIFFUSE 0 |
| | Diffuse texture.
|
| #define | VR3TEX_LIGHT 1 |
| | Light map.
|
| #define | VR3TEX_NORMAL 2 |
| | Normal map.
|
| #define | VR3TEX_DISPLACEMENT 3 |
| | Displacement map.
|
|
| #define | VR3SDOW_NUM_SOURCES 16 |
| | Number of shadow sources (inactive by default)
|
| #define | VR3SDOW_DEF_DEPTHSCALE 40.0f |
| | Default value for the depth scale algorithm parameter.
|
| #define | VR3SDOW_DEF_MINVARIANCE 0.00001f |
| | Default value for the minimum variance algorithm parameter.
|
| #define | VR3SDOW_DEF_INTENSITY 0.4f |
| | Default value for the shadow intensity algorithm parameter.
|
| #define | VR3SDOW_DEF_BLEEDREDUCTION 0.0f |
| | Default value for the bleeding reduction factor algorithm parameter.
|
| #define | VR3SDOW_DEF_FILTERSIZE 3 |
| | Default value for the filter size algorithm parameter.
|
| #define | VR3SDOW_MAX_DEPTHSCALE 40.0f |
| | Maximum value for the depth scale algorithm parameter.
|
| #define | VR3SDOW_MAX_FILTERSIZE 10 |
| | Maximum value for the filter size algorithm parameter.
|
| #define | VR3SDOW_MIN_FILTERSIZE 1 |
| | Minimum value for the filter size algorithm parameter.
|
|
| #define | VR3SDOW_SOURCE 0 |
| | Identifies one of the shadow sources in the controller.
|
| #define | VR3SDOW_VF_CULLING 1 |
| | Shadow view frustum culling flag.
|
| #define | VR3SDOW_FACE_CULLING 2 |
| | Backface culling during shadow map rendering flag.
|
| #define | VR3SDOW_SOURCE_CULLING 3 |
| | Shadow source culling during shadow map rendering flag.
|
|
| #define | VR3SDOWCTRL_AUTOMATIC 0 |
| | Automatic object sets management mode.
|
| #define | VR3SDOWCTRL_MANUAL 1 |
| | Manual object sets management mode.
|
|
| #define | VR3SDOWCTRL_BLUR_VER_POS_INDEX 0 |
| | Constant VBO index for vertex positions.
|
|
| #define | VR3FBO_MAX_IMAGES 16 |
| | Maximum number of color images attached.
|
|
The following list of integer identifiers will be used as names to identify specific uniform variables in the standard shaders. Those integer names are mapped on uniform locations using the uniform map VR3ShaderManager::ms_std_uniforms. The location of a specific uniform variable may change when considering different shader programs. Notice that the identifiers MUST be used as array indices (for maximum performance) and for this reason they must be integer numbers increasing from 0. Order is not significant.
|
| #define | VR3_NUM_STD_UNIFORMS 39 |
| | Total number of uniform identifiers for standard rendering shaders.
|
| #define | VR3UNI_transformMatrix 0 |
| | Projection*ModelView transformation matrix.
|
| #define | VR3UNI_eyePosObj 1 |
| | Eye position in object coordinates.
|
| #define | VR3UNI_modelMatrix 2 |
| | Modeling transformation matrix.
|
| #define | VR3UNI_viewMatrix 3 |
| | Viewing transformation matrix.
|
| #define | VR3UNI_projMatrix 4 |
| | Projection transformation matrix.
|
| #define | VR3UNI_normalMatrix 5 |
| | Transformation matrix to use to bring normals to the world space.
|
| #define | VR3UNI_matEmission 6 |
| | Material emission.
|
| #define | VR3UNI_matAmbient 7 |
| | Material ambient.
|
| #define | VR3UNI_matDiffuse 8 |
| | Material diffuse.
|
| #define | VR3UNI_matSpecular 9 |
| | Material specular.
|
| #define | VR3UNI_matOpacity 10 |
| | Material opacity.
|
| #define | VR3UNI_matShininess 11 |
| | Material shininess.
|
| #define | VR3UNI_lightAmbient 12 |
| | Lights ambient array.
|
| #define | VR3UNI_lightDiffuse 13 |
| | Lights diffuse array.
|
| #define | VR3UNI_lightSpecular 14 |
| | Lights specular array.
|
| #define | VR3UNI_lightPosObj 15 |
| | Lights position in object coordinates array.
|
| #define | VR3UNI_numActiveLights 16 |
| | Number of active lights.
|
| #define | VR3UNI_lightPos 17 |
| | Lights position in world coordinates array.
|
| #define | VR3UNI_diffMatrix 18 |
| | Diffuse texture coordinates transformation.
|
| #define | VR3UNI_diffFlag 19 |
| | Diffuse texture flag (used in external shader programs)
|
| #define | VR3UNI_lightMatrix 20 |
| | Light map coordinates transformation.
|
| #define | VR3UNI_lightFlag 21 |
| | Light map flag (used in external shader programs)
|
| #define | VR3UNI_normMatrix 22 |
| | Normal map coordinates transformation.
|
| #define | VR3UNI_normFlag 23 |
| | Normal map flag (used in external shader programs)
|
| #define | VR3UNI_dispMatrix 24 |
| | Displacement map coordinates transformation.
|
| #define | VR3UNI_dispFlag 25 |
| | Displacement map flag (used in external shader programs)
|
| #define | VR3UNI_dispBI 26 |
| | Displacement map bias value.
|
| #define | VR3UNI_dispSC 27 |
| | Displacement map scale value.
|
| #define | VR3UNI_dispTF 28 |
| | Displacement map tessellation factor.
|
| #define | VR3UNI_envMode 29 |
| | Environment mapping mode (same as VR3Scene::m_env_mode)
|
| #define | VR3UNI_shaNumActiveSources 30 |
| | Number of active shadow sources in the current shadow controller.
|
| #define | VR3UNI_shaModelView 31 |
| | Shadow source modelview array of matrices.
|
| #define | VR3UNI_shaProj 32 |
| | Shadow source projection array of matrices (corrected for shadow map lookup)
|
| #define | VR3UNI_shaMinVariance 33 |
| | Array of minimum variances.
|
| #define | VR3UNI_shaIntensity 34 |
| | Array of shadow intensities.
|
| #define | VR3UNI_shaBleedRedFactor 35 |
| | Array of light bleeding reduction factors.
|
| #define | VR3UNI_shaDepthScale 36 |
| | Array of depth scales.
|
| #define | VR3UNI_shazFar 37 |
| | Array of far clipping distance values.
|
| #define | VR3UNI_shazNear 38 |
| | Array of near clipping distance values.
|
|
The following list of integer identifiers will be used as names to identify specific uniform variables in the background shaders. Those integer names are mapped on uniform locations using the uniform map VR3ShaderManager::ms_bg_uniforms. The location of a specific uniform variable may change when considering different shader programs. Notice that the identifiers MUST be used as array indices (for maximum performance) and for this reason they must be integer numbers increasing from 0. Order is not significant.
|
| #define | VR3_NUM_BG_UNIFORMS 1 |
| | Total number of uniform identifiers.
|
| #define | VR3UNI_bg_transformMatrix 0 |
| | Projection*View transformation matrix (a modified viewing matrix is used - no translation)
|
|
The following list of integer identifiers will be used as names to identify specific uniform variables in the shadow map shader. Those integer names are mapped on uniform locations using the array VR3ShaderManager::ms_shad_uniforms. Notice that the identifiers MUST be used as array indices (for maximum performance) and for this reason they must be integer numbers increasing from 0. Order is not significant.
|
| #define | VR3_NUM_SHAD_UNIFORMS 5 |
| | Total number of uniform identifiers.
|
| #define | VR3UNI_shad_modelViewMatrix 0 |
| | Shadow source viewing and modeling matrix.
|
| #define | VR3UNI_shad_projMatrix 1 |
| | Shadow source projection matrix.
|
| #define | VR3UNI_shad_depthScale 2 |
| | Depth scale algorithm parameter.
|
| #define | VR3UNI_shad_zFar 3 |
| | Far clipping distance shadow source parameter.
|
| #define | VR3UNI_shad_zNear 4 |
| | Near clipping distance shadow source parameter.
|
|
The following list of integer identifiers will be used as names to identify specific uniform variables in the blurring shaders. Those integer names are mapped on uniform locations using the arrays VR3ShaderManager::ms_blur_uniforms. Notice that the identifiers MUST be used as array indices (for maximum performance) and for this reason they must be integer numbers increasing from 0. Order is not significant.
|
| #define | VR3_NUM_BLUR_UNIFORMS 2 |
| | Total number of uniform identifiers.
|
| #define | VR3UNI_blur_texSize 0 |
| | Shadow map width or height depending on the particular shader program.
|
| #define | VR3UNI_blur_filterSize 1 |
| | Gaussian blur filter width (1 to 10, in pixels)
|
|
The following list of integer identifiers will be used as names to identify specific uniform variables in the text string shaders. Those integer names are mapped on uniform locations using the arrays VR3ShaderManager::ms_text_uniforms. Notice that the identifiers MUST be used as array indices (for maximum performance) and for this reason they must be integer numbers increasing from 0. Order is not significant.
|
| #define | VR3_NUM_TEXT_UNIFORMS 3 |
| | Total number of uniform identifiers.
|
| #define | VR3UNI_text_transformMatrix 0 |
| | Projection*ModelView transformation matrix.
|
| #define | VR3UNI_text_offset 1 |
| | Offset along the axes before applying the transformation matrix.
|
| #define | VR3UNI_text_color 2 |
| | Color of the text string.
|
|
| #define | VR3SH_GS_COMPONENTS_PER_VERTEX_DIFF 11 |
| | number of output components per vertex with diffuse texture
|
| #define | VR3SH_GS_COMPONENTS_PER_VERTEX_NODIFF 9 |
| | number of output components per vertex without diffuse texture
|
|
| #define | VR3_MAX_NOTIFICATION_LENGTH 256 |
| | number of maximum characters in a predefined notification message
|
|
| #define | VR3PHYMESH_DYNAMIC 0 |
| | Dynamic mesh type identifier.
|
| #define | VR3PHYMESH_STATIC 1 |
| | Static mesh type identifier.
|
| #define | VR3PHYMESH_KINEMATIC 2 |
| | Kinematic mesh type identifier.
|
|
| #define | VR3PHY_DYN_SKINDIVIDER 200.0f |
| | Skin divider for dynamic and kinematic objects (convex meshes)
|
| #define | VR3PHY_STA_SKINDIVIDER 1000.0f |
| | Skin divider for static objects (generic triangle meshes)
|
| #define | VR3PHY_PROJDISTDIVIDER 1.0f |
| | Projection distance divider.
|
| #define | VR3PHY_DEF_SKINWIDTH 0.1f |
| | Default skin width for shapes.
|
| #define | VR3PHY_DEF_GRAVITY 0.0f,-9.80665f,0.0f |
| | Default gravity for physics simulation.
|
| #define | VR3PHYSIM_DEF_ITERNUM 10 |
| | Default solver iteration steps.
|
| #define | VR3PHYSIM_DEF_TIMESTEP (1.0f/120.0f) |
| | Simulation timestep.
|
| #define | VR3PHYSIM_DEF_MAXSTEPS 8 |
| | Maximum number of steps in a single simulation cycle.
|
|
| #define | VR3PHYSIM_AUTOMATIC 0 |
| | Automatic object registration mode.
|
| #define | VR3PHYSIM_MANUAL 1 |
| | Manual object registration mode.
|
|
| #define | VR3_INT_STRING_LENGTH 16 |
| | number of characters in a buffer used to store an integer value as a string
|
|
| #define | STRINGIFY2(x) #x |
| | Stringify a nonstring macro (second expansion)
|
| #define | STRINGIFY(x) STRINGIFY2(x) |
| | Stringify a nonstring macro (first expansion)
|
Functions |
|
| void | VR3Init () |
| | VR3Lib initialization function.
|
| void | VR3Deinit () |
| | VR3Lib deinitialization function.
|
VRlib base header file.
This header file defines some constants used by the VRLib engine and should be the first VRLib file to include in any project.