"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

<gpu_program> XML Node


XML Node Summary
<gpu_program
  name=""
  active="TRUE"
  filename=""
  >
  <uniform_1i
    name=""
    x="0"
    >
  </uniform_1i>
  <uniform_2i
    name=""
    x, y="0"
    >
  </uniform_2i>
  <uniform_3i
    name=""
    x, y, z="0"
    >
  </uniform_3i>
  <uniform_4i
    name=""
    x, y, z, w="0"
    >
  </uniform_4i>
  <uniform_1f
    name=""
    x="0"
    >
  </uniform_1f>
  <uniform_2f
    name=""
    x, y="0"
    >
  </uniform_2f>
  <uniform_3f
    name=""
    x, y, z="0"
    >
  </uniform_3f>
  <uniform_4f
    name=""
    x, y, z, w="0"
    >
  </uniform_4f>
  <uniform_4x4f_view_matrix
    name=""
    >
  </uniform_4x4f_view_matrix>
  <uniform_4x4f_projection_matrix
    name=""
    >
  </uniform_4x4f_projection_matrix>
  <uniform_4x4f_model_matrix
    name=""
    >
  </uniform_4x4f_model_matrix>
  <raw_data
    >
  </raw_data>
</gpu_program>


<gpu_program>

Description
Allows to load and execute real time shaders. Current shading languages supported: GLSL (OpenGL Shading Language).

gpu_program element has 3 attributes and 12 sub-element(s)

Attributes
  • name [STRING]: name of this XML node.
  • active [BOOLEAN]: enables (TRUE) or disables (FALSE) the shader. - Default value = TRUE
  • filename [STRING]: location of the shader file relative to the main XML script. Currently the vertex and pixel shaders must be in the same file.

<uniform_1i>

Description
Specifies the name and the value of an uniform 1D vector of integers to pass to the shader. The name of this constant must be declared in the source code of the shader.

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

Attributes
  • name [STRING]: name of the uniform variable.
  • x [INTEGER]: uniform value. - Default value = 0

<uniform_2i>

Description
Specifies the name and the value of an uniform 2D vector of integers to pass to the shader. The name of this constant must be declared in the source code of the shader.

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

Attributes
  • name [STRING]: name of the uniform variable.
  • x, y [INTEGER]: uniform value. - Default value = 0

<uniform_3i>

Description
Specifies the name and the value of an uniform 3D vector of integers to pass to the shader. The name of this constant must be declared in the source code of the shader.

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

Attributes
  • name [STRING]: name of the uniform variable.
  • x, y, z [INTEGER]: uniform value. - Default value = 0

<uniform_4i>

Description
Specifies the name and the value of an uniform 4D vector of integers to pass to the shader. The name of this constant must be declared in the source code of the shader.

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

Attributes
  • name [STRING]: name of the uniform variable.
  • x, y, z, w [INTEGER]: uniform value. - Default value = 0

<uniform_1f>

Description
Specifies the name and the value of an uniform 1D vector of float to pass to the shader. The name of this constant must be declared in the source code of the shader.

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

Attributes
  • name [STRING]: name of the uniform variable.
  • x [REAL]: uniform value. - Default value = 0

<uniform_2f>

Description
Specifies the name and the value of an uniform 2D vector of float to pass to the shader. The name of this constant must be declared in the source code of the shader.

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

Attributes
  • name [STRING]: name of the uniform variable.
  • x, y [REAL]: uniform value. - Default value = 0

<uniform_3f>

Description
Specifies the name and the value of an uniform 3D vector of float to pass to the shader. The name of this constant must be declared in the source code of the shader.

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

Attributes
  • name [STRING]: name of the uniform variable.
  • x, y, z [REAL]: uniform value. - Default value = 0

<uniform_4f>

Description
Specifies the name and the value of an uniform 4D vector of float to pass to the shader. The name of this constant must be declared in the source code of the shader.

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

Attributes
  • name [STRING]: name of the uniform variable.
  • x, y, z, w [REAL]: uniform value. - Default value = 0

<uniform_4x4f_view_matrix>

Description
Specifies the name of a 4x4 matrix to pass to the shader. The value of the matrix is automatically set by GeeXLab (current view matrix).

uniform_4x4f_view_matrix element has 1 attributes and 0 sub-element(s)

Attributes
  • name [STRING]: name of the uniform variable.

<uniform_4x4f_projection_matrix>

Description
Specifies the name of a 4x4 matrix to pass to the shader. The value of the matrix is automatically set by GeeXLab (current projection matrix).

uniform_4x4f_projection_matrix element has 1 attributes and 0 sub-element(s)

Attributes
  • name [STRING]: name of the uniform variable.

<uniform_4x4f_model_matrix>

Description
Specifies the name of a 4x4 matrix to pass to the shader. The value of the matrix is automatically set by GeeXLab (transformation matrix of the object that is currently rendered).

uniform_4x4f_model_matrix element has 1 attributes and 0 sub-element(s)

Attributes
  • name [STRING]: name of the uniform variable.

<raw_data>

Description
Allows to integrate the source code of a shader directly in the XML code without requiring an external file.

raw_data element has 0 attributes and 0 sub-element(s)
Code sample :

<geexlab>
<gpu_program name="simpleShader" >
<raw_data><![CDATA[
[Vertex_Shader]
void main(void)
{
gl_Position = ftransform();
}
[Pixel_Shader]
void main()
{
gl_FragColor = vec4(1.0, 0.5, 0.5, 1.0);
}
]]></raw_data>
</gpu_program>
</geexlab>
Random Projects

2D Shockwave Effect
2D Shockwave Effect

Blender Object Viewer
Blender Object Viewer

Gaussian Blur PostFX
Gaussian Blur PostFX


Random Code Samples

Skybox
Skybox

Bloom PostFX
Bloom PostFX

Point Emitter
Point Emitter



(C)2009-2010 Geeks3D.com