Quick Links
  • Homepage
        - Overview
        - Download
        - Screenshots
        - Community
  • Code Sample Pack
  • Reference Guide
  • Changelog
  • Overview of GLSL Hacker
  • Live Coding
  • Hack your first GLSL Code
  • Moon3D




  • GLSL Hacker Articles

    > Compute shaders on Radeon
    > Distance functions in GLSL
    > GLSL Interpolation Qualifiers
    > Tessellation Spacing Modes
    > Normal Visualizer with GS
    > 3D Surface Plots
    > Normal Mapping
    > Circle and Disc in GLSL
    > PhysX 3 Flag Demo
    > GLSL Hacker on Raspberry Pi
    GLSL Hacker

    Reference Guide
    XML Nodes



    Back to homepage
    Back to Developer's Guide Index

    <gpu_program> XML Node


    XML Node Summary
    <gpu_program
      name=""
      filename=""
      absolute_path="0"
      filename_vs=""
      absolute_path_vs="0"
      filename_ps=""
      absolute_path_ps="0"
      filename_gs=""
      absolute_path_gs="0"
      filename_tcs=""
      absolute_path_tcs="0"
      filename_tes=""
      absolute_path_tes="0"
      filename_cs=""
      absolute_path_cs="0"
      >
      <raw_data />
      <raw_data_vs />
      <raw_data_ps />
      <raw_data_gs />
      <raw_data_tcs />
      <raw_data_tes />
      <raw_data_cs />
    </gpu_program>
    


    <gpu_program>

    Description
    Allows to load and execute real time shaders written in GLSL.

    gpu_program element has 15 attributes and 7 sub-element(s)

    Attributes
    • name [STRING]: name of this XML node.
    • filename [STRING]: location of the complete GLSL progam file.
    • absolute_path [INTEGER]: absolute (1) or relative (0) path for the filename. - Default value = 0
    • filename_vs [STRING]: location of a vertex shader file relative to the main XML script. Currently the vertex and pixel shaders must be in the same file.
    • absolute_path_vs [INTEGER]: absolute (1) or relative (0) path for the filename_vs. - Default value = 0
    • filename_ps [STRING]: location of a pixel shader file relative to the main XML script. Currently the vertex and pixel shaders must be in the same file.
    • absolute_path_ps [INTEGER]: absolute (1) or relative (0) path for the filename_ps. - Default value = 0
    • filename_gs [STRING]: location of a geometry shader file relative to the main XML script. Currently the vertex and pixel shaders must be in the same file.
    • absolute_path_gs [INTEGER]: absolute (1) or relative (0) path for the filename_gs. - Default value = 0
    • filename_tcs [STRING]: location of a tessellation control shader file relative to the main XML script. Currently the vertex and pixel shaders must be in the same file.
    • absolute_path_tcs [INTEGER]: absolute (1) or relative (0) path for the filename_tcs. - Default value = 0
    • filename_tes [STRING]: location of a tessellation evaluation shader file relative to the main XML script. Currently the vertex and pixel shaders must be in the same file.
    • absolute_path_tes [INTEGER]: absolute (1) or relative (0) path for the filename_tes. - Default value = 0
    • filename_cs [STRING]: location of a compute shader file relative to the main XML script. Currently the vertex and pixel shaders must be in the same file.
    • absolute_path_cs [INTEGER]: absolute (1) or relative (0) path for the filename_cs. - Default value = 0

    Code sample :

    <glsl_hacker>

    <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>


    <gpu_program name="shader_v2" >
    <raw_data_vs><![CDATA[
    void main(void)
    {
    gl_Position = ftransform();
    }
    ]]></raw_data_vs>

    <raw_data_ps><![CDATA[
    void main()
    {
    gl_FragColor = vec4(1.0, 0.5, 0.5, 1.0);
    }
    ]]></raw_data_ps>
    </gpu_program>

    </glsl_hacker>

    <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)

    <raw_data_vs>

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

    raw_data_vs element has 0 attributes and 0 sub-element(s)

    <raw_data_ps>

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

    raw_data_ps element has 0 attributes and 0 sub-element(s)

    <raw_data_gs>

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

    raw_data_gs element has 0 attributes and 0 sub-element(s)

    <raw_data_tcs>

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

    raw_data_tcs element has 0 attributes and 0 sub-element(s)

    <raw_data_tes>

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

    raw_data_tes element has 0 attributes and 0 sub-element(s)

    <raw_data_cs>

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

    raw_data_cs element has 0 attributes and 0 sub-element(s)

    (C)2012-2014 Geeks3D