Xors3d Engine
Shaders effects

Functions

BBDECL void BBCALL xClearEffectConstants (Entity *entity, int layer=-1)
 Clears all passed constansts.
BBDECL void BBCALL xClearFXConstants (Effect *effect)
 Deletes all the global values of the constants from an effect.
BBDECL void BBCALL xClearSurfaceConstants (Surface *surface, int layer=-1)
 Clears all passed constansts of surface.
BBDECL void BBCALL xDeleteEffectConstant (Entity *entity, const char *name, int layer=-1)
 Deletes a specified effect constant.
BBDECL void BBCALL xDeleteFXConstant (Effect *effect, const char *name)
 Deletes a global value of a constant from an effect.
BBDECL void BBCALL xDeleteSurfaceConstant (Surface *surface, const char *name, int layer=-1)
 Deletes a specified surface's effect constant.
BBDECL void BBCALL xFreeEffect (Effect *effect)
 Frees up an effect.
BBDECL int BBCALL xGetEntityShaderLayer (Entity *entity)
 Returns an active shader layer of an entity.
BBDECL int BBCALL xGetSurfaceShaderLayer (Surface *surface)
 Returns an active shader layer of a surface.
BBDECL Effect *BBCALL xLoadFXFile (const char *path)
 Loads an effect from file.
BBDECL void BBCALL xSetBonesArrayName (Entity *entity, const char *arrayName, int layer=-1)
 Sets a name of shader constant to pass bones for skinning computing.
BBDECL void BBCALL xSetEffectBool (Entity *entity, const char *name, bool value, int layer=-1)
 Sets a boolean constant value for entity shaders.
BBDECL void BBCALL xSetEffectEntityTexture (Entity *entity, const char *name, int index=0, int layer=-1)
 Sets shader texture constant by entity's texture.
BBDECL void BBCALL xSetEffectFloat (Entity *entity, const char *name, float value, int layer=-1)
 Sets a floating constant value for entity shaders.
BBDECL void BBCALL xSetEffectFloatArray (Entity *entity, const char *name, float *value, int count, int layer=-1)
 Sets a floating array constant for entity shaders.
BBDECL void BBCALL xSetEffectInt (Entity *entity, const char *name, int value, int layer=-1)
 Sets an integer constant value for entity shaders.
BBDECL void BBCALL xSetEffectIntArray (Entity *entity, const char *name, int *value, int count, int layer=-1)
 Sets an integer array constant for entity shaders.
BBDECL void BBCALL xSetEffectMatrix (Entity *entity, const char *name, float *matrix, int layer=-1)
 Sets a matrix constant value for entity shaders.
BBDECL void BBCALL xSetEffectMatrixArray (Entity *entity, const char *name, Matrix44 *value, int count, int layer=-1)
 Sets a matrices array constant for shaders.
BBDECL void BBCALL xSetEffectMatrixSemantic (Entity *entity, const char *name, int value, int layer=-1)
 Sets a matrix constant for entity shaders by matrix semantic.
BBDECL void BBCALL xSetEffectTechnique (Entity *entity, const char *name, int layer=-1)
 Sets active effect rendering technique.
BBDECL void BBCALL xSetEffectTexture (Entity *entity, const char *name, Texture *texture, int frame=0, int layer=-1, int isRecursive=1)
 Sets a texture constant for entity shader.
BBDECL void BBCALL xSetEffectVector (Entity *entity, const char *name, float x, float y, float z, float w=0.0f, int layer=-1)
 Sets a vector constant for entity shader.
BBDECL void BBCALL xSetEffectVectorArray (Entity *entity, const char *name, Vector4 *value, int count, int layer=-1)
 Sets a vectors array constant for entity shaders.
BBDECL void BBCALL xSetEntityEffect (Entity *entity, Effect *effect, int index=-1)
 Assings shader effect to entity.
BBDECL void BBCALL xSetEntityShaderLayer (Entity *entity, int layer)
 Sets an active shader layer for an entity.
BBDECL void BBCALL xSetFXBool (Effect *effect, const char *name, bool value)
 Sets a global value of a boolean constant for an effect.
BBDECL void BBCALL xSetFXEntityMatrix (Effect *effect, const char *name, Matrix44 *matrix)
 Sets a global value of a matrix constant for an effect.
BBDECL void BBCALL xSetFXFloat (Effect *effect, const char *name, float value)
 Sets a global value of a floating-point constant for an effect.
BBDECL void BBCALL xSetFXFloatArray (Effect *effect, const char *name, float *value, int count)
 Sets a global value of a floating-point array constant for an effect.
BBDECL void BBCALL xSetFXInt (Effect *effect, const char *name, int value)
 Sets a global value of a integer constant for an effect.
BBDECL void BBCALL xSetFXIntArray (Effect *effect, const char *name, int *value, int count)
 Sets a global value of an integer array constant for an effect.
BBDECL void BBCALL xSetFXMatrixArray (Effect *effect, const char *name, Matrix44 *value, int count)
 Sets a global value of a matrices array constant for an effect.
BBDECL void BBCALL xSetFXMatrixSemantic (Effect *effect, const char *name, int value)
 Sets an global value of a matrix semantic constant for an effect.
BBDECL void BBCALL xSetFXTechnique (Effect *effect, const char *name)
 Sets a global technique name for effect.
BBDECL void BBCALL xSetFXTexture (Effect *effect, const char *name, Texture *texture, int frame=0)
 Sets a global value of a texture constant for an effect.
BBDECL void BBCALL xSetFXVector (Effect *effect, const char *name, float x, float y, float z, float w=0.0f)
 Sets a global value of a vector constant for an effect.
BBDECL void BBCALL xSetFXVectorArray (Effect *effect, const char *name, Vector4 *value, int count)
 Sets a global value of a vectors array constant for an effect.
BBDECL void BBCALL xSetSurfaceEffect (Surface *surface, Effect *effect, int index=-1)
 Sets shader effect for surface.
BBDECL void BBCALL xSetSurfaceShaderLayer (Surface *surface, int layer)
 Sets an active shader layer for a surface.
BBDECL void BBCALL xSurfaceBonesArrayName (Surface *surface, const char *arrayName, int layer=-1)
 Sets shader constant name for passing bones for skinning computing.
BBDECL void BBCALL xSurfaceEffectBool (Surface *surface, const char *name, bool value, int layer=-1)
 Sets a boolean constant value for surface shaders.
BBDECL void BBCALL xSurfaceEffectFloat (Surface *surface, const char *name, float value, int layer=-1)
 Sets a floating constant value for surface shaders.
BBDECL void BBCALL xSurfaceEffectFloatArray (Surface *surface, const char *name, float *value, int count, int layer=-1)
 Sets a floating array constant for surface shaders.
BBDECL void BBCALL xSurfaceEffectInt (Surface *surface, const char *name, int value, int layer=-1)
 Sets shaders integer constant value.
BBDECL void BBCALL xSurfaceEffectIntArray (Surface *surface, const char *name, int *value, int count, int layer=-1)
 Sets an integer array constant for surface shaders.
BBDECL void BBCALL xSurfaceEffectMatrix (Surface *surface, const char *name, float *matrix, int layer=-1)
 Sets a matrix constant value for surface shaders.
BBDECL void BBCALL xSurfaceEffectMatrixArray (Surface *surface, const char *name, Matrix44 *value, int count, int layer=-1)
 Sets a matrices array constant for surface shaders.
BBDECL void BBCALL xSurfaceEffectMatrixSemantic (Surface *surface, const char *name, int value, int layer=-1)
 Sets a matrix constant for surface shaders by matrix semantic.
BBDECL void BBCALL xSurfaceEffectTexture (Surface *surface, const char *name, Texture *texture, int frame=0, int layer=-1)
 Sets a texture constant for surface shader.
BBDECL void BBCALL xSurfaceEffectVector (Surface *surface, const char *name, float x, float y, float z, float w=0.0f, int layer=-1)
 Sets a vector constant for surface shader.
BBDECL void BBCALL xSurfaceEffectVectorArray (Surface *surface, const char *name, Vector4 *value, int count, int layer=-1)
 Sets a vectors array constant for surface shaders.
BBDECL void BBCALL xSurfaceTechnique (Surface *surface, const char *name, int layer=-1)
 Sets active surface's effect rendering technique.
BBDECL int BBCALL xValidateEffectTechnique (Effect *effect, const char *name)
 Returns true if hardware supports specified technique.

Function Documentation

BBDECL Effect* BBCALL xLoadFXFile ( const char *  path)

Loads an effect from file.

Xors3D supports DirectX effects files (it uses HLSL as shaders language), it's more powerful and easy to use than regular shaders, you can change render states manually, make multi-pass effects and much more.

Parameters:
pathString containing filename of effect file
BBDECL void BBCALL xFreeEffect ( Effect *  effect)

Frees up an effect.

Parameters:
effectEffect handle
BBDECL void BBCALL xSetEntityEffect ( Entity *  entity,
Effect *  effect,
int  index = -1 
)

Assings shader effect to entity.

Parameters:
entityEntity handle
effectEffect handle
indexIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetSurfaceEffect ( Surface *  surface,
Effect *  effect,
int  index = -1 
)

Sets shader effect for surface.

Parameters:
surfaceSurafce handle
effectEffect handle
indexIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetBonesArrayName ( Entity *  entity,
const char *  arrayName,
int  layer = -1 
)

Sets a name of shader constant to pass bones for skinning computing.

If you use hardware skinning, you must pass bones transformation matrices in shader and transform vertices in it.

Parameters:
entityEntity handle
arrayNameName of shader constant for passing bones matrices
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSurfaceBonesArrayName ( Surface *  surface,
const char *  arrayName,
int  layer = -1 
)

Sets shader constant name for passing bones for skinning computing.

If you use hadrware skinning, you should pass bone transformation matrices to shader and transform vertices in it. This command specify constant name for each surface in mesh separatly.

Parameters:
surfaceSurface handle
arrayNameName of shader constant for passing bone matrices
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetEffectInt ( Entity *  entity,
const char *  name,
int  value,
int  layer = -1 
)

Sets an integer constant value for entity shaders.

Parameters:
entityEntity handle
nameConstant name
valueConstant value
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSurfaceEffectInt ( Surface *  surface,
const char *  name,
int  value,
int  layer = -1 
)

Sets shaders integer constant value.

Parameters:
surfaceSurface handle
nameConstant name
valueConstant value
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetEffectFloat ( Entity *  entity,
const char *  name,
float  value,
int  layer = -1 
)

Sets a floating constant value for entity shaders.

Parameters:
entityEntity handle
nameConstant name
valueConstant value
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSurfaceEffectFloat ( Surface *  surface,
const char *  name,
float  value,
int  layer = -1 
)

Sets a floating constant value for surface shaders.

Parameters:
surfaceSurface handle
nameConstant name
valueConstant value
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetEffectBool ( Entity *  entity,
const char *  name,
bool  value,
int  layer = -1 
)

Sets a boolean constant value for entity shaders.

Parameters:
entityEntity handle
nameConstant name
valueConstant value
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSurfaceEffectBool ( Surface *  surface,
const char *  name,
bool  value,
int  layer = -1 
)

Sets a boolean constant value for surface shaders.

Parameters:
surfaceSurface handle
nameConstant name
valueConstant value
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetEffectVector ( Entity *  entity,
const char *  name,
float  x,
float  y,
float  z,
float  w = 0.0f,
int  layer = -1 
)

Sets a vector constant for entity shader.

Parameters:
entityEntity handle
nameConstant name
xVertor's x component
yVertor's y component
zVertor's z component
wVertor's w component
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSurfaceEffectVector ( Surface *  surface,
const char *  name,
float  x,
float  y,
float  z,
float  w = 0.0f,
int  layer = -1 
)

Sets a vector constant for surface shader.

Parameters:
surfaceSurface handle
nameConstant name
xVertor's x component
yVertor's y component
zVertor's z component
wVertor's w component
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetEffectVectorArray ( Entity *  entity,
const char *  name,
Vector4 *  value,
int  count,
int  layer = -1 
)

Sets a vectors array constant for entity shaders.

Parameters:
entityEntity handle
nameConstant name
valuePointer to vectors array
countNumber of elements in array
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSurfaceEffectVectorArray ( Surface *  surface,
const char *  name,
Vector4 *  value,
int  count,
int  layer = -1 
)

Sets a vectors array constant for surface shaders.

Parameters:
surfaceSurface handle
nameConstant name
valuePointer to vectors array
countNumber of elements in array
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSurfaceEffectMatrixArray ( Surface *  surface,
const char *  name,
Matrix44 *  value,
int  count,
int  layer = -1 
)

Sets a matrices array constant for surface shaders.

Parameters:
surfaceSurface handle
nameConstant name
valuePointer to matrices array
countNumber of elements in array
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSurfaceEffectFloatArray ( Surface *  surface,
const char *  name,
float *  value,
int  count,
int  layer = -1 
)

Sets a floating array constant for surface shaders.

Parameters:
surfaceSurface handle
nameConstant name
valuePointer to floating array
countNumber of elements in array
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSurfaceEffectIntArray ( Surface *  surface,
const char *  name,
int *  value,
int  count,
int  layer = -1 
)

Sets an integer array constant for surface shaders.

Parameters:
surfaceSurface handle
nameConstant name
valuePointer to integer array
countNumber of elements in array
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetEffectMatrixArray ( Entity *  entity,
const char *  name,
Matrix44 *  value,
int  count,
int  layer = -1 
)

Sets a matrices array constant for shaders.

Parameters:
entityEntity handle
nameConstant name
valuePointer to matrices array
countNumber of elements in array
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetEffectFloatArray ( Entity *  entity,
const char *  name,
float *  value,
int  count,
int  layer = -1 
)

Sets a floating array constant for entity shaders.

Parameters:
entityEntity handle
nameConstant name
valuePointer to floating array
countNumber of elements in array
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetEffectIntArray ( Entity *  entity,
const char *  name,
int *  value,
int  count,
int  layer = -1 
)

Sets an integer array constant for entity shaders.

Parameters:
entityEntity handle
nameConstant name
valuePointer to integer array
countNumber of elements in array
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetEffectMatrix ( Entity *  entity,
const char *  name,
float *  matrix,
int  layer = -1 
)

Sets a matrix constant value for entity shaders.

Use with pointer to the matrix returned by xGetProjectionMatrix(), xGetViewMatrix(), xGetViewProjMatrix() and xGetEntityMatrix().

Parameters:
entityEntity handle
nameConstant name
matrixPointer to matrix
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSurfaceEffectMatrix ( Surface *  surface,
const char *  name,
float *  matrix,
int  layer = -1 
)

Sets a matrix constant value for surface shaders.

Use with pointer to the matrix returned by xGetProjectionMatrix(), xGetViewMatrix(), xGetViewProjMatrix() and xGetEntityMatrix().

Parameters:
surfaceSurface handle
nameConstant name
matrixPointer to matrix
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetEffectEntityTexture ( Entity *  entity,
const char *  name,
int  index = 0,
int  layer = -1 
)

Sets shader texture constant by entity's texture.

You can use it for automatic passing textures loaded with mesh or applied by xEntityTexture() to a shader.

Parameters:
entityEntity handle
nameConstant name
indexTextre layer index. Must be in range 0-7
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetEffectTexture ( Entity *  entity,
const char *  name,
Texture *  texture,
int  frame = 0,
int  layer = -1,
int  isRecursive = 1 
)

Sets a texture constant for entity shader.

Parameters:
entityEntity handle
nameConstant name
textureTexture handle
frameTexture frame
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
isRecursiveIf 1 (true) then entity's children will receive the texture too.
BBDECL void BBCALL xSurfaceEffectTexture ( Surface *  surface,
const char *  name,
Texture *  texture,
int  frame = 0,
int  layer = -1 
)

Sets a texture constant for surface shader.

Parameters:
surfaceSurface handle
nameConstant name
textureTexture handle
frameTexture frame
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSurfaceEffectMatrixSemantic ( Surface *  surface,
const char *  name,
int  value,
int  layer = -1 
)

Sets a matrix constant for surface shaders by matrix semantic.

See 'Matrix semantics' for more infromation.

Parameters:
surfaceSurface handle
nameConstant name
valueMatrix semantic
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetEffectMatrixSemantic ( Entity *  entity,
const char *  name,
int  value,
int  layer = -1 
)

Sets a matrix constant for entity shaders by matrix semantic.

See 'Matrix semantics' for more infromation.

Parameters:
entityEntity handle
nameConstant name
valueMatrix semantic
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xDeleteSurfaceConstant ( Surface *  surface,
const char *  name,
int  layer = -1 
)

Deletes a specified surface's effect constant.

Parameters:
surfaceSurface handle
nameConstant name
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xDeleteEffectConstant ( Entity *  entity,
const char *  name,
int  layer = -1 
)

Deletes a specified effect constant.

Parameters:
entityEntity handle
nameConstant name
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xClearSurfaceConstants ( Surface *  surface,
int  layer = -1 
)

Clears all passed constansts of surface.

This function deletes all constants passed into effect (by functions like xSurfaceEffectInt(), xSurfaceEffectTexture() etc).

Parameters:
surfaceSurface handle
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xClearEffectConstants ( Entity *  entity,
int  layer = -1 
)

Clears all passed constansts.

This function deletes all constants passed into effect (by functions like xSetEffectInt(), xSetEffectTexture() etc).

Parameters:
entityEntity handle
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSetEffectTechnique ( Entity *  entity,
const char *  name,
int  layer = -1 
)

Sets active effect rendering technique.

You may check support of technique by hardware using xValidateEffectTechnique()

Parameters:
entityEntity handle
nameTechnique name
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL void BBCALL xSurfaceTechnique ( Surface *  surface,
const char *  name,
int  layer = -1 
)

Sets active surface's effect rendering technique.

You may check support technique on hadware by xValidateEffectTechnique()

Parameters:
surfaceSurface handle
nameTechnique name
layerIndex of the effect layer in range [0; 7]. If -1 is passed - active layer will be used (see xSetShaderLayer())
BBDECL int BBCALL xValidateEffectTechnique ( Effect *  effect,
const char *  name 
)

Returns true if hardware supports specified technique.

Parameters:
effectEffect handle
nameTechnique name
BBDECL void BBCALL xSetEntityShaderLayer ( Entity *  entity,
int  layer 
)

Sets an active shader layer for an entity.

This value overrides a global shader layer. If -1 is passed - a global value will be used

BBDECL int BBCALL xGetEntityShaderLayer ( Entity *  entity)

Returns an active shader layer of an entity.

BBDECL void BBCALL xSetSurfaceShaderLayer ( Surface *  surface,
int  layer 
)

Sets an active shader layer for a surface.

This value overrides a global shader layer. If -1 is passed - a global value will be used

BBDECL int BBCALL xGetSurfaceShaderLayer ( Surface *  surface)

Returns an active shader layer of a surface.

BBDECL void BBCALL xSetFXInt ( Effect *  effect,
const char *  name,
int  value 
)

Sets a global value of a integer constant for an effect.

This value will override all mesh or surface constants with same name.

Parameters:
effectEffect handle
nameConstant name
valueConstant value
BBDECL void BBCALL xSetFXFloat ( Effect *  effect,
const char *  name,
float  value 
)

Sets a global value of a floating-point constant for an effect.

This value will override all mesh or surface constants with same name.

Parameters:
effectEffect handle
nameConstant name
valueConstant value
BBDECL void BBCALL xSetFXBool ( Effect *  effect,
const char *  name,
bool  value 
)

Sets a global value of a boolean constant for an effect.

This value will override all mesh or surface constants with same name.

Parameters:
effectEffect handle
nameConstant name
valueConstant value
BBDECL void BBCALL xSetFXVector ( Effect *  effect,
const char *  name,
float  x,
float  y,
float  z,
float  w = 0.0f 
)

Sets a global value of a vector constant for an effect.

This value will override all mesh or surface constants with same name.

Parameters:
effectEffect handle
nameConstant name
xX-component of the vector
yY-component of the vector
zZ-component of the vector
wW-component of the vector
BBDECL void BBCALL xSetFXVectorArray ( Effect *  effect,
const char *  name,
Vector4 *  value,
int  count 
)

Sets a global value of a vectors array constant for an effect.

This value will override all mesh or surface constants with same name.

Parameters:
effectEffect handle
nameConstant name
valueConstant value
countArray size
BBDECL void BBCALL xSetFXMatrixArray ( Effect *  effect,
const char *  name,
Matrix44 *  value,
int  count 
)

Sets a global value of a matrices array constant for an effect.

This value will override all mesh or surface constants with same name.

Parameters:
effectEffect handle
nameConstant name
valueConstant value
countArray size
BBDECL void BBCALL xSetFXFloatArray ( Effect *  effect,
const char *  name,
float *  value,
int  count 
)

Sets a global value of a floating-point array constant for an effect.

This value will override all mesh or surface constants with same name.

Parameters:
effectEffect handle
nameConstant name
valueConstant value
countArray size
BBDECL void BBCALL xSetFXIntArray ( Effect *  effect,
const char *  name,
int *  value,
int  count 
)

Sets a global value of an integer array constant for an effect.

This value will override all mesh or surface constants with same name.

Parameters:
effectEffect handle
nameConstant name
valueConstant value
countArray size
BBDECL void BBCALL xSetFXEntityMatrix ( Effect *  effect,
const char *  name,
Matrix44 *  matrix 
)

Sets a global value of a matrix constant for an effect.

This value will override all mesh or surface constants with same name.

Parameters:
effectEffect handle
nameConstant name
matrixMatrix value
BBDECL void BBCALL xSetFXTexture ( Effect *  effect,
const char *  name,
Texture *  texture,
int  frame = 0 
)

Sets a global value of a texture constant for an effect.

This value will override all mesh or surface constants with same name.

Parameters:
effectEffect handle
nameConstant name
textureTexture handle
frameTexture's frame index
BBDECL void BBCALL xSetFXMatrixSemantic ( Effect *  effect,
const char *  name,
int  value 
)

Sets an global value of a matrix semantic constant for an effect.

This value will override all mesh or surface constants with same name.

Parameters:
effectEffect handle
nameConstant name
valueSemantic value
BBDECL void BBCALL xDeleteFXConstant ( Effect *  effect,
const char *  name 
)

Deletes a global value of a constant from an effect.

Parameters:
effectEffect handle
nameConstant name
BBDECL void BBCALL xClearFXConstants ( Effect *  effect)

Deletes all the global values of the constants from an effect.

Parameters:
effectEffect handle
BBDECL void BBCALL xSetFXTechnique ( Effect *  effect,
const char *  name 
)

Sets a global technique name for effect.

This value will override all mesh or surface techniques.

Parameters:
effectEffect handle
nameTechnique name