-
Notifications
You must be signed in to change notification settings - Fork 0
class_fixedmaterial
reduz edited this page Feb 23, 2014
·
12 revisions
Inherits: material\ Category: Core\
Simple Material with a fixed parameter set.
- void #set_parameter( int param, var value )
- void #get_parameter( int param ) const
- void #set_texture( int param, Texture texture )
- Texture #get_texture( int param ) const
- void #set_texcoord_mode( int param, int mode )
- int #get_texcoord_mode( int param ) const
- void #set_fixed_flag( int flag, bool value )
- bool #get_fixed_flag( int flag ) const
- void #set_uv_transform( Transform transform )
- Transform #get_uv_transform(****) const
- void #set_point_size( real size )
- real #get_point_size(****) const
- void #set_detail_blend_mode( int mode )
- int #get_detail_blend_mode(****) const
- PARAM_DIFFUSE = 0 - Diffuse Lighting (light scattered from surface).
- PARAM_DETAIL = 1 - Detail Layer for diffuse lighting.
- PARAM_SPECULAR = 2 - Specular Lighting (light reflected from the surface).
- PARAM_EMISSION = 3 - Emission Lighting (light emitted from the surface)
- PARAM_SPECULAR_EXP = 4 - Specular Exponent (size of the specular dot)
- PARAM_GLOW = 5 - Glow (Visible emitted scattered light).
- PARAM_NORMAL = 6 - Normal Map (irregularity map).
- PARAM_SHADE_PARAM = 7
- PARAM_MAX = 8 - Maximum amount of parameters
- TEXCOORD_SPHERE = 3
- TEXCOORD_UV = 0 - Read texture coordinates from the UV array.
- TEXCOORD_UV_TRANSFORM = 1 - Read texture coordinates from the UV array and transform them by uv_xform.
- TEXCOORD_UV2 = 2 - Read texture coordinates from the UV2 array.
- FLAG_USE_ALPHA = 0
- FLAG_USE_COLOR_ARRAY = 1
- FLAG_USE_POINT_SIZE = 2
FixedMaterial is a simple type of material resource, which contains a fixed amount of paramters. It is the only type of material supported in fixed-pipeline devices and APIs. It is also an often a better alternative to shadermaterial for most simple use cases.
== set_parameter ==
- void #set_parameter( int param, var value ) \ Set a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it"apos;s best to check the enum. == get_parameter ==
- void #get_parameter( int param ) const \ Return a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it"apos;s best to check the enum. == set_texture ==
- void #set_texture( int param, Texture texture ) \ Set a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see #set_texcoord_mode). == get_texture ==
- Texture #get_texture( int param ) const \ Return a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see #set_texcoord_mode). == set_texcoord_mode ==
- void #set_texcoord_mode( int param, int mode ) \ Set the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object. == get_texcoord_mode ==
- int #get_texcoord_mode( int param ) const \ Return the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object. == set_uv_transform ==
- void #set_uv_transform( Transform transform ) \ Sets a special transform used to post-transform UV coordinates of the uv_xfrom tecoord mode: TEXCOORD_UV_TRANSFORM == get_uv_transform ==
- Transform #get_uv_transform(****) const \ Returns the special transform used to post-transform UV coordinates of the uv_xfrom tecoord mode: TEXCOORD_UV_TRANSFORM