"No one can be told what GeeXLab is, you have to see it for yourself!"

"Stop Playing Games and Start Making Them! With GeeXLab, your are on your way!"


Quick Links
What is GeeXLab
Download GeeXLab
GeeXLab Requirements
Online Help
Articles and Tutorials
Samples Screenshots
Videos

GeeXLab Changelog

XML Ref. Guide
Scripting Ref. Guide
Code Samples

Purchase GeeXLab
GeeXLab SDK

Shader Library

Follow GeeXLab's News
GeeXLab news, articles, tutorials and demos @ Geeks3D.com
GeeXLab @ Twitter GeeXLab RSS Feed

Subscribe to GeeXLab news by email

[ Back to Geeks3D.com ]

GeeXLab

GeeXLab

Laboratory for Real Time 3D Programming (prototyping and demos)
OpenGL, Lua, Python, GLSL,
PhysX and more...

Reference Guide
XML Nodes



Back to homepage
Back to Developer's Guide Index

<hud> XML Node


XML Node Summary
<hud
  name=""
  render="TRUE"
  texturing="FALSE"
  auto_spin="FALSE"
  material_name=""
  >
  <texture
    texture_name=""
    texture_unit="0"
    u_tile="1.0"
    v_tile="1.0"
    u_offset="0.0"
    v_offset="0.0"
    u_move="0.0"
    v_move="0.0"
    >
  </texture>
  <alpha_test_params
    active =""
    func=""
    ref="0.5"
    >
  </alpha_test_params>
  <blending_params
    active ="FALSE"
    src_factor="BLENDING_FACTOR_SRC_ALPHA"
    dst_factor="BLENDING_FACTOR_ONE_MINUS_SRC_ALPHA"
    >
  </blending_params>
  <position
    x=""
    y=""
    >
  </position>
  <spin_values
    x="0.0"
    y="0.0"
    z="0.0"
    >
  </spin_values>
  <vertex_color
    index="0"
    r="1.0"
    g="1.0"
    b="1.0"
    a="1.0"
    >
  </vertex_color>
</hud>


<hud>

Description
The hud node makes it possible to define 2d elements always displayed on the foreground (as if they were stuck to the camera). Hud comes from Head Up Display. The majority of the games uses them to render the scores or life counter. It is relatively significant for the finalization of a scene. Moreover almost all demos delivered with Demoniak3D integrate one or more Huds.

hud element has 5 attributes and 6 sub-element(s)

Attributes
  • name [STRING]: name of the HUD
  • render [BOOLEAN]: enables or disables the hud's rendering. - Default value = TRUE - Values = TRUE|FALSE
  • texturing [BOOLEAN]: enables or disables the texturing. - Default value = FALSE - Values = TRUE|FALSE
  • auto_spin [BOOLEAN]: enables or disables auto-rotation around HUD's z-axis. - Default value = FALSE - Values = TRUE|FALSE
  • material_name [STRING]: material that will replace HUD's default material.

Code sample :

<hud name="myHud" render="TRUE" texturing="TRUE" >
<position x="0.0" y="0.0" />
<texture texture_name="hudTexture" texture_unit="0" />
<ablending_params active="FALSE" src_factor="BLENDING_FACTOR_SRC_ALPHA" dst_factor="BLENDING_FACTOR_ONE_MINUS_SRC_ALPHA" />
</hud>

<texture>

Description
Adds a texture.

texture element has 8 attributes and 0 sub-element(s)

Attributes
  • texture_name [STRING]: texture name
  • texture_unit [INTEGER]: texture unit on which set the texture - Default value = 0 - Values = [0-7]
  • u_tile [REAL]: tiling factor of the u texture coord. - Default value = 1.0
  • v_tile [REAL]: tiling factor of the v texture coord. - Default value = 1.0
  • u_offset [REAL]: offset of the u texture coord. - Default value = 0.0
  • v_offset [REAL]: offset of the v texture coord. - Default value = 0.0
  • u_move [REAL]: u coordinate increment at each frame. - Default value = 0.0
  • v_move [REAL]: v coordinate increment at each frame. - Default value = 0.0

<alpha_test_params>

Description
Sets the parameters for the hardware alpha-test.

alpha_test_params element has 3 attributes and 0 sub-element(s)

Attributes
  • active [INTEGER]: enables (1) or disables (0) the alpha-test - Values = 0|1
  • func [STRING]: alpha comparison function. - Values = CMP_FUNC_NEVER|CMP_FUNC_LESS | CMP_FUNC_LESS_OR_EQUAL | CMP_FUNC_GREATER | CMP_FUNC_GREATER_OR_EQUAL | CMP_FUNC_EQUAL | CMP_FUNC_NOT_EQUAL | CMP_FUNC_ALWAYS
  • ref [REAL]: reference value with which the entering alpha value is compared. This reference value must lie between 0.0 and 1.0. - Default value = 0.5

<blending_params>

Description
Sets the parameters for the hardware color blending.

blending_params element has 3 attributes and 0 sub-element(s)

Attributes
  • active [BOOELAN]: enables or disables the blending - Default value = FALSE - Values = TRUE|FALSE
  • src_factor [STRING]: blending source factor. - Default value = BLENDING_FACTOR_SRC_ALPHA - Values = BLENDING_FACTOR_ZERO | BLENDING_FACTOR_ONE | BLENDING_FACTOR_SRC_ALPHA | BLENDING_FACTOR_ONE_MINUS_DST_ALPHA | BLENDING_FACTOR_ONE_MINUS_DST_COLOR | BLENDING_FACTOR_ONE_MINUS_SRC_ALPHA | BLENDING_FACTOR_DST_COLOR | BLENDING_FACTOR_DST_ALPHA | BLENDING_FACTOR_SRC_COLOR | BLENDING_FACTOR_ONE_MINUS_SRC_COLOR
  • dst_factor [STRING]: blending destination factor. - Default value = BLENDING_FACTOR_ONE_MINUS_SRC_ALPHA - Values = BLENDING_FACTOR_ZERO | BLENDING_FACTOR_ONE | BLENDING_FACTOR_SRC_ALPHA | BLENDING_FACTOR_ONE_MINUS_DST_ALPHA | BLENDING_FACTOR_ONE_MINUS_DST_COLOR | BLENDING_FACTOR_ONE_MINUS_SRC_ALPHA | BLENDING_FACTOR_DST_COLOR | BLENDING_FACTOR_DST_ALPHA | BLENDING_FACTOR_SRC_COLOR | BLENDING_FACTOR_ONE_MINUS_SRC_COLOR

<position>

Description
Sets the hud's center position. The position (0;0) is the center of the 3D window.

position element has 2 attributes and 0 sub-element(s)

Attributes
  • x [REAL]: X coordinate of the position
  • y [REAL]: Y coordinate of the position

<spin_values>

Description
Specifies the rotation angles around the X, Y and Z axis. At each frame, the HUD rotation angles are incremented by the specified values. But in the case of a HUD element, only the animation around the axis of Z has a direction.

spin_values element has 3 attributes and 0 sub-element(s)

Attributes
  • x [REAL]: rotation angle around the X axis in degrees - Default value = 0.0
  • y [REAL]: rotation angle around the Y axis in degrees - Default value = 0.0
  • z [REAL]: rotation angle around the Z axis in degrees - Default value = 0.0

<vertex_color>

Description
Specifies the new color to be applied to one of the four vertices which defines the HUD.

vertex_color element has 5 attributes and 0 sub-element(s)

Attributes
  • index [INTEGER]: index of the vertex to be changed. - Default value = 0 - Values = [0 - 3]
  • r [REAL]: red component of the color. - Default value = 1.0
  • g [REAL]: green component of the color. - Default value = 1.0
  • b [REAL]: blue component of the color. - Default value = 1.0
  • a [REAL]: alpha component of the color. - Default value = 1.0
Random Projects

Chromatic Aberration
Chromatic Aberration

Gaussian Blur PostFX
Gaussian Blur PostFX

Phong Lighting Multiple Lights
Phong Lighting Multiple Lights


Random Code Samples

Model Cloning
Model Cloning

Texture viewer
Texture viewer

Texture - Video AVI
Texture - Video AVI



(C)2009-2010 Geeks3D.com