Skip to content

class_fixedmaterial

reduz edited this page Feb 23, 2014 · 12 revisions

FixedMaterial

Inherits: Material\n\n

Brief Description

Simple Material with a fixed parameter set.

Member Functions

Numeric Constants

  • 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

Description

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.

Member Function Description

  • 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.
  • 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.
  • 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.
  • 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.
  • 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
  • Transform ** get_uv_transform ** ( ) const \ Returns the special transform used to post-transform UV coordinates of the uv_xfrom tecoord mode: TEXCOORD_UV_TRANSFORM
Clone this wiki locally