The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here. More...
The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.
Source of the alpha value to take.
This is currently only supported in EMT_ONETEXTURE_BLEND. You can use an or'ed combination of values. Alpha values are modulated (multiplicated).
EAS_NONE |
Use no alpha, somewhat redundant with other settings. |
EAS_VERTEX_COLOR |
Use vertex color alpha. |
EAS_TEXTURE |
Use texture alpha channel. |
Definition at line 104 of file SMaterial.h.
These flags are used to specify the anti-aliasing and smoothing modes.
Techniques supported are multisampling, geometry smoothing, and alpha to coverage. Some drivers don't support a per-material setting of the anti-aliasing modes. In those cases, FSAA/multisampling is defined by the device mode chosen upon creation via irr::SIrrCreationParameters.
Definition at line 158 of file SMaterial.h.
Flag for EMT_ONETEXTURE_BLEND, ( BlendFactor ) BlendFunc = source * sourceFactor + dest * destFactor.
Definition at line 23 of file SMaterial.h.
Values defining the blend operation used when blend is enabled.
Definition at line 39 of file SMaterial.h.
These flags allow to define the interpretation of vertex color when lighting is enabled.
Without lighting being enabled the vertex color is the only value defining the fragment color. Once lighting is enabled, the four values for diffuse, ambient, emissive, and specular take over. With these flags it is possible to define which lighting factor shall be defined by the vertex color instead of the lighting factor which is the same for all faces of that material. The default is to use vertex color for the diffuse value, another pretty common value is to use vertex color for both diffuse and ambient factor.
Definition at line 184 of file SMaterial.h.
Enum values for enabling/disabling color planes for rendering.
ECP_NONE |
No color enabled. |
ECP_ALPHA |
Alpha enabled. |
ECP_RED |
Red enabled. |
ECP_GREEN |
Green enabled. |
ECP_BLUE |
Blue enabled. |
ECP_RGB |
All colors, no alpha. |
ECP_ALL |
All planes enabled. |
Definition at line 83 of file SMaterial.h.
Comparison function, e.g. for depth buffer test.
Definition at line 62 of file SMaterial.h.
An enum for all types of drivers the Irrlicht Engine supports.
Definition at line 14 of file EDriverTypes.h.
Enum for the types of fog distributions to choose from.
Definition at line 133 of file IVideoDriver.h.
Enum for supported geometry shader types.
EGST_GS_4_0 | |
EGST_COUNT |
This is not a type, but a value indicating how much types there are. |
Definition at line 72 of file EShaderTypes.h.
Enumeration for different types of shading languages.
EGSL_DEFAULT |
The default language, so HLSL for Direct3D and GLSL for OpenGL. |
EGSL_CG |
Cg shading language.*/. |
Definition at line 28 of file IGPUProgrammingServices.h.
Definition at line 15 of file SVertexIndex.h.
Enumeration for different types of lights.
enumeration for signaling resources which were lost after the last render cycle
These values can be signaled by the driver, telling the app that some resources were lost and need to be recreated. Irrlicht will sometimes recreate the actual objects, but the content needs to be recreated by the application.
Definition at line 92 of file IVideoDriver.h.
Material flags.
Definition at line 14 of file EMaterialFlags.h.
Abstracted and easy to use fixed function/programmable pipeline material modes.
EMT_SOLID |
Standard solid material. Only first texture is used, which is supposed to be the diffuse material. |
EMT_SOLID_2_LAYER |
Solid material with 2 texture layers. The second is blended onto the first using the alpha value of the vertex colors. This material is currently not implemented in OpenGL. |
EMT_LIGHTMAP |
Material type with standard lightmap technique. There should be 2 textures: The first texture layer is a diffuse map, the second is a light map. Dynamic light is ignored. |
EMT_LIGHTMAP_ADD |
Material type with lightmap technique like EMT_LIGHTMAP. But lightmap and diffuse texture are added instead of modulated. |
EMT_LIGHTMAP_M2 |
Material type with standard lightmap technique. There should be 2 textures: The first texture layer is a diffuse map, the second is a light map. Dynamic light is ignored. The texture colors are effectively multiplied by 2 for brightening. Like known in DirectX as D3DTOP_MODULATE2X. |
EMT_LIGHTMAP_M4 |
Material type with standard lightmap technique. There should be 2 textures: The first texture layer is a diffuse map, the second is a light map. Dynamic light is ignored. The texture colors are effectively multiplyied by 4 for brightening. Like known in DirectX as D3DTOP_MODULATE4X. |
EMT_LIGHTMAP_LIGHTING |
Like EMT_LIGHTMAP, but also supports dynamic lighting. |
EMT_LIGHTMAP_LIGHTING_M2 |
Like EMT_LIGHTMAP_M2, but also supports dynamic lighting. |
EMT_LIGHTMAP_LIGHTING_M4 |
Like EMT_LIGHTMAP_4, but also supports dynamic lighting. |
EMT_DETAIL_MAP |
Detail mapped material. The first texture is diffuse color map, the second is added to this and usually displayed with a bigger scale value so that it adds more detail. The detail map is added to the diffuse map using ADD_SIGNED, so that it is possible to add and substract color from the diffuse map. For example a value of (127,127,127) will not change the appearance of the diffuse map at all. Often used for terrain rendering. |
EMT_SPHERE_MAP |
Look like a reflection of the environment around it. To make this possible, a texture called 'sphere map' is used, which must be set as the first texture. |
EMT_REFLECTION_2_LAYER |
A reflecting material with an optional non reflecting texture layer. The reflection map should be set as first texture. |
EMT_TRANSPARENT_ADD_COLOR |
A transparent material. Only the first texture is used. The new color is calculated by simply adding the source color and the dest color. This means if for example a billboard using a texture with black background and a red circle on it is drawn with this material, the result is that only the red circle will be drawn a little bit transparent, and everything which was black is 100% transparent and not visible. This material type is useful for particle effects. |
EMT_TRANSPARENT_ALPHA_CHANNEL |
Makes the material transparent based on the texture alpha channel. The final color is blended together from the destination color and the texture color, using the alpha channel value as blend factor. Only first texture is used. If you are using this material with small textures, it is a good idea to load the texture in 32 bit mode (video::IVideoDriver::setTextureCreationFlag()). Also, an alpha ref is used, which can be manipulated using SMaterial::MaterialTypeParam. This value controls how sharp the edges become when going from a transparent to a solid spot on the texture. |
EMT_TRANSPARENT_ALPHA_CHANNEL_REF |
Makes the material transparent based on the texture alpha channel. If the alpha channel value is greater than 127, a pixel is written to the target, otherwise not. This material does not use alpha blending and is a lot faster than EMT_TRANSPARENT_ALPHA_CHANNEL. It is ideal for drawing stuff like leafes of plants, because the borders are not blurry but sharp. Only first texture is used. If you are using this material with small textures and 3d object, it is a good idea to load the texture in 32 bit mode (video::IVideoDriver::setTextureCreationFlag()). |
EMT_TRANSPARENT_VERTEX_ALPHA |
Makes the material transparent based on the vertex alpha value. |
EMT_TRANSPARENT_REFLECTION_2_LAYER |
A transparent reflecting material with an optional additional non reflecting texture layer. The reflection map should be set as first texture. The transparency depends on the alpha value in the vertex colors. A texture which will not reflect can be set as second texture. Please note that this material type is currently not 100% implemented in OpenGL. |
EMT_NORMAL_MAP_SOLID |
A solid normal map renderer. First texture is the color map, the second should be the normal map. Note that you should use this material only when drawing geometry consisting of vertices of type S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into this format using IMeshManipulator::createMeshWithTangents() (See SpecialFX2 Tutorial). This shader runs on vertex shader 1.1 and pixel shader 1.1 capable hardware and falls back to a fixed function lighted material if this hardware is not available. Only two lights are supported by this shader, if there are more, the nearest two are chosen. |
EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR |
A transparent normal map renderer. First texture is the color map, the second should be the normal map. Note that you should use this material only when drawing geometry consisting of vertices of type S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into this format using IMeshManipulator::createMeshWithTangents() (See SpecialFX2 Tutorial). This shader runs on vertex shader 1.1 and pixel shader 1.1 capable hardware and falls back to a fixed function lighted material if this hardware is not available. Only two lights are supported by this shader, if there are more, the nearest two are chosen. |
EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA |
A transparent (based on the vertex alpha value) normal map renderer. First texture is the color map, the second should be the normal map. Note that you should use this material only when drawing geometry consisting of vertices of type S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into this format using IMeshManipulator::createMeshWithTangents() (See SpecialFX2 Tutorial). This shader runs on vertex shader 1.1 and pixel shader 1.1 capable hardware and falls back to a fixed function lighted material if this hardware is not available. Only two lights are supported by this shader, if there are more, the nearest two are chosen. |
EMT_PARALLAX_MAP_SOLID |
Just like EMT_NORMAL_MAP_SOLID, but uses parallax mapping. Looks a lot more realistic. This only works when the hardware supports at least vertex shader 1.1 and pixel shader 1.4. First texture is the color map, the second should be the normal map. The normal map texture should contain the height value in the alpha component. The IVideoDriver::makeNormalMapTexture() method writes this value automatically when creating normal maps from a heightmap when using a 32 bit texture. The height scale of the material (affecting the bumpiness) is being controlled by the SMaterial::MaterialTypeParam member. If set to zero, the default value (0.02f) will be applied. Otherwise the value set in SMaterial::MaterialTypeParam is taken. This value depends on with which scale the texture is mapped on the material. Too high or low values of MaterialTypeParam can result in strange artifacts. |
EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR |
A material like EMT_PARALLAX_MAP_SOLID, but transparent. Using EMT_TRANSPARENT_ADD_COLOR as base material. |
EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA |
A material like EMT_PARALLAX_MAP_SOLID, but transparent. Using EMT_TRANSPARENT_VERTEX_ALPHA as base material. |
EMT_ONETEXTURE_BLEND |
BlendFunc = source * sourceFactor + dest * destFactor ( E_BLEND_FUNC ) Using only first texture. Generic blending method. |
EMT_FORCE_32BIT |
This value is not used. It only forces this enumeration to compile to 32 bit. |
Definition at line 14 of file EMaterialTypes.h.
MaterialTypeParam: e.g. DirectX: D3DTOP_MODULATE, D3DTOP_MODULATE2X, D3DTOP_MODULATE4X.
Definition at line 54 of file SMaterial.h.
Compile target enumeration for the addHighLevelShaderMaterial() method.
Definition at line 38 of file EShaderTypes.h.
Flags for the definition of the polygon offset feature.
These flags define whether the offset should be into the screen, or towards the eye.
Definition at line 202 of file SMaterial.h.
Special render targets, which usually map to dedicated hardware.
These render targets (besides 0 and 1) need not be supported by gfx cards
Definition at line 106 of file IVideoDriver.h.
Texture coord clamp mode outside [0.0, 1.0].
Definition at line 18 of file SMaterialLayer.h.
Enumeration flags telling the video driver in which format textures should be created.
Definition at line 22 of file ITexture.h.
Enum for the mode for texture locking. Read-Only, write-only or read/write.
Definition at line 74 of file ITexture.h.
enumeration for geometry transformation states
Definition at line 52 of file IVideoDriver.h.
Compile target enumeration for the addHighLevelShaderMaterial() method.
EVST_VS_1_1 | |
EVST_VS_2_0 | |
EVST_VS_2_a | |
EVST_VS_3_0 | |
EVST_VS_4_0 | |
EVST_VS_4_1 | |
EVST_VS_5_0 | |
EVST_COUNT |
This is not a type, but a value indicating how much types there are. |
Definition at line 12 of file EShaderTypes.h.
Enumeration for all vertex types there are.
EVT_STANDARD |
Standard vertex type used by the Irrlicht engine, video::S3DVertex. |
EVT_2TCOORDS |
Vertex with two texture coordinates, video::S3DVertex2TCoords. Usually used for geometry with lightmaps or other special materials. |
EVT_TANGENTS |
Vertex with a tangent and binormal vector, video::S3DVertexTangents. Usually used for tangent space normal mapping. |
Definition at line 18 of file S3DVertex.h.
enumeration for querying features of the video driver.
Definition at line 14 of file EDriverFeatures.h.
An enum for the color format of textures used by the Irrlicht Engine.
A color format specifies how color information is stored.
u32 irr::video::A1R5G5B5toA8R8G8B8 | ( | u16 | color | ) | [inline] |
Convert A8R8G8B8 Color from A1R5G5B5 color.
build a nicer 32bit Color by extending dest lower bits with source high bits.
Definition at line 117 of file SColor.h.
Referenced by irr::video::SColor::setData().
u16 irr::video::A1R5G5B5toR5G6B5 | ( | u16 | color | ) | [inline] |
u16 irr::video::A8R8G8B8toA1R5G5B5 | ( | u32 | color | ) | [inline] |
Converts a 32bit (A8R8G8B8) color to a 16bit A1R5G5B5 color.
Definition at line 97 of file SColor.h.
Referenced by irr::video::SColor::getData(), and irr::video::SColor::toA1R5G5B5().
u16 irr::video::A8R8G8B8toR5G6B5 | ( | u32 | color | ) | [inline] |
Converts a 32bit (A8R8G8B8) color to a 16bit R5G6B5 color.
Definition at line 107 of file SColor.h.
Referenced by irr::video::SColor::getData().
u32 irr::video::getAlpha | ( | u16 | color | ) | [inline] |
s32 irr::video::getAverage | ( | s16 | color | ) | [inline] |
Returns the average from a 16 bit A1R5G5B5 color.
Definition at line 186 of file SColor.h.
References getBlue(), getGreen(), and getRed().
u32 irr::video::getBlue | ( | u16 | color | ) | [inline] |
Returns the blue component from A1R5G5B5 color.
Shift left by 3 to get 8 bit value.
Definition at line 179 of file SColor.h.
Referenced by getAverage().
u32 irr::video::getGreen | ( | u16 | color | ) | [inline] |
Returns the green component from A1R5G5B5 color.
Shift left by 3 to get 8 bit value.
Definition at line 171 of file SColor.h.
Referenced by getAverage().
u32 irr::video::getRed | ( | u16 | color | ) | [inline] |
Returns the red component from A1R5G5B5 color.
Shift left by 3 to get 8 bit value.
Definition at line 163 of file SColor.h.
Referenced by getAverage().
u32 irr::video::getVertexPitchFromType | ( | E_VERTEX_TYPE | vertexType | ) | [inline] |
Definition at line 256 of file S3DVertex.h.
References EVT_2TCOORDS, and EVT_TANGENTS.
f32 irr::video::pack_textureBlendFunc | ( | const E_BLEND_FACTOR | srcFact, |
const E_BLEND_FACTOR | dstFact, | ||
const E_MODULATE_FUNC | modulate = EMFN_MODULATE_1X , |
||
const u32 | alphaSource = EAS_TEXTURE |
||
) | [inline] |
EMT_ONETEXTURE_BLEND: pack srcFact, dstFact, Modulate and alpha source to MaterialTypeParam.
alpha source can be an OR'ed combination of E_ALPHA_SOURCE values.
Definition at line 116 of file SMaterial.h.
References irr::core::FR().
u16 irr::video::R5G6B5toA1R5G5B5 | ( | u16 | color | ) | [inline] |
u32 irr::video::R5G6B5toA8R8G8B8 | ( | u16 | color | ) | [inline] |
Returns A8R8G8B8 Color from R5G6B5 color.
Definition at line 128 of file SColor.h.
Referenced by irr::video::SColor::setData().
u16 irr::video::RGB16 | ( | u32 | r, |
u32 | g, | ||
u32 | b | ||
) | [inline] |
u16 irr::video::RGB16from16 | ( | u16 | r, |
u16 | g, | ||
u16 | b | ||
) | [inline] |
u16 irr::video::RGBA16 | ( | u32 | r, |
u32 | g, | ||
u32 | b, | ||
u32 | a = 0xFF |
||
) | [inline] |
bool irr::video::textureBlendFunc_hasAlpha | ( | const E_BLEND_FACTOR | factor | ) | [inline] |
EMT_ONETEXTURE_BLEND: has BlendFactor Alphablending.
Definition at line 135 of file SMaterial.h.
References EBF_DST_ALPHA, EBF_ONE_MINUS_DST_ALPHA, EBF_ONE_MINUS_SRC_ALPHA, EBF_SRC_ALPHA, and EBF_SRC_ALPHA_SATURATE.
void irr::video::unpack_textureBlendFunc | ( | E_BLEND_FACTOR & | srcFact, |
E_BLEND_FACTOR & | dstFact, | ||
E_MODULATE_FUNC & | modulo, | ||
u32 & | alphaSource, | ||
const f32 | param | ||
) | [inline] |
EMT_ONETEXTURE_BLEND: unpack srcFact & dstFact and Modulo to MaterialTypeParam.
The fields don't use the full byte range, so we could pack even more...
Definition at line 124 of file SMaterial.h.
References irr::core::IR().
u16 irr::video::X8R8G8B8toA1R5G5B5 | ( | u32 | color | ) | [inline] |
const c8* const irr::video::FogTypeNames[] |
{ "FogExp", "FogLinear", "FogExp2", 0 }
Definition at line 140 of file IVideoDriver.h.
const c8* const irr::video::GEOMETRY_SHADER_TYPE_NAMES[] |
{
"gs_4_0",
0 }
String names for supported geometry shader types.
Definition at line 81 of file EShaderTypes.h.
IRRLICHT_API SMaterial irr::video::IdentityMaterial |
global const identity Material
Referenced by irr::scene::ISceneNode::getMaterial().
const c8* const irr::video::LightTypeNames[] |
const u32 irr::video::MATERIAL_MAX_TEXTURES = _IRR_MATERIAL_MAX_TEXTURES_ |
Maximum number of texture an SMaterial can have.
Definition at line 223 of file SMaterial.h.
Referenced by irr::video::SMaterial::getTexture(), irr::video::SMaterial::getTextureMatrix(), irr::video::SMaterial::operator!=(), irr::video::SMaterial::operator=(), irr::video::SMaterial::setFlag(), irr::scene::ISceneNode::setMaterialTexture(), irr::video::SMaterial::setTexture(), irr::video::SMaterial::setTextureMatrix(), and irr::video::SMaterial::SMaterial().
const c8* const irr::video::PIXEL_SHADER_TYPE_NAMES[] |
{ "ps_1_1", "ps_1_2", "ps_1_3", "ps_1_4", "ps_2_0", "ps_2_a", "ps_2_b", "ps_3_0", "ps_4_0", "ps_4_1", "ps_5_0", 0 }
Names for all pixel shader types, each entry corresponds to a E_PIXEL_SHADER_TYPE entry.
Definition at line 57 of file EShaderTypes.h.
const c8* const irr::video::PolygonOffsetDirectionNames[] |
{ "Back", "Front", 0 }
Names for polygon offset direction.
Definition at line 214 of file SMaterial.h.
const char* const irr::video::sBuiltInMaterialTypeNames[] |
{ "solid", "solid_2layer", "lightmap", "lightmap_add", "lightmap_m2", "lightmap_m4", "lightmap_light", "lightmap_light_m2", "lightmap_light_m4", "detail_map", "sphere_map", "reflection_2layer", "trans_add", "trans_alphach", "trans_alphach_ref", "trans_vertex_alpha", "trans_reflection_2layer", "normalmap_solid", "normalmap_trans_add", "normalmap_trans_vertexalpha", "parallaxmap_solid", "parallaxmap_trans_add", "parallaxmap_trans_vertexalpha", "onetexture_blend", 0 }
Array holding the built in material type names.
Definition at line 200 of file EMaterialTypes.h.
const char* const irr::video::sBuiltInVertexTypeNames[] |
{ "standard", "2tcoords", "tangents", 0 }
Array holding the built in vertex type names.
Definition at line 33 of file S3DVertex.h.
const c8* const irr::video::VERTEX_SHADER_TYPE_NAMES[] |
{ "vs_1_1", "vs_2_0", "vs_2_a", "vs_3_0", "vs_4_0", "vs_4_1", "vs_5_0", 0 }
Names for all vertex shader types, each entry corresponds to a E_VERTEX_SHADER_TYPE entry.
Definition at line 27 of file EShaderTypes.h.