< GeeXLab Reference Guide />

> Back to Reference Guide Index


gh_render_target library

Description

gh_render_target is the module that manages render targets. A render target is used in render to texture and post processing effects.


Number of functions: 13

  1. gh_render_target.create (Lua - Python)
  2. gh_render_target.create_v2 (Lua - Python)
  3. gh_render_target.create_ex (Lua - Python)
  4. gh_render_target.create_ex_v3 (Lua - Python)
  5. gh_render_target.create_rb (Lua - Python)
  6. gh_render_target.create_depth (Lua - Python)
  7. gh_render_target.create_cubemap (Lua - Python)
  8. gh_render_target.cubemap_set_draw_face (Lua - Python)
  9. gh_render_target.kill (Lua - Python)
  10. gh_render_target.bind (Lua - Python)
  11. gh_render_target.resize (Lua - Python)
  12. gh_render_target.resolve_multisampling (Lua - Python)
  13. gh_render_target.use_with_syphon (Lua - Python)



create

Description

Creates a render target.


Syntax

rt_id = gh_render_target.create(
 width, height
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
rt_id = gh_render_target.create(2048, 2048)
            


create_v2

Description

Creates a render target with multiple render targets (MRTs).


Syntax

rt_id = gh_render_target.create_v2(
 width, height,
 num_color_targets
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
rt_id = gh_render_target.create_v2(2048, 2048, 4)
            


create_ex

Description

Creates a render target.


Syntax

rt_id = gh_render_target.create_ex(
 width, height,
 pixel_format,
 linear_filtering,
 msaa_samples
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
PF_U8_RGB = 1
PF_U8_BGR = 2
PF_U8_RGBA = 3
PF_U8_BGRA = 4
PF_F32_RGB = 5
PF_F32_RGBA = 6
PF_F32_R = 7
linear_filtering = 1
msaa_samples = 4
rt_id = gh_render_target.create_ex(2048, 2048, PF_F32_RGBA, linear_filtering, msaa_samples)
            


create_ex_v3

Description

Creates a render target with multiple render targets (MRTs).


Syntax

rt_id = gh_render_target.create_ex_v3(
 width, height,
 num_color_targets,
 pixel_format,
 linear_filtering,
 clamp_addressing,
 msaa_samples
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
num_color_targets = 4
PF_U8_RGB = 1
PF_U8_BGR = 2
PF_U8_RGBA = 3
PF_U8_BGRA = 4
PF_F32_RGB = 5
PF_F32_RGBA = 6
PF_F32_R = 7
PF_F16_RGB = 8
PF_F16_RGBA = 9
PF_F16_R = 10
PF_U8_R = 11
PF_U8_RG = 12
linear_filtering = 1
clamp_addressing = 1
msaa_samples = 4
rt_id = gh_render_target.create_ex_v3(2048, 2048, num_color_targets, PF_F32_RGBA, linear_filtering, msaa_samples)
            


create_rb

Description

Creates a color depth render buffer.


Syntax

rt_id = gh_render_target.create_rb(
 width, height,
 pixel_format,
 msaa_samples
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
PF_U8_RGB = 1
PF_U8_BGR = 2
PF_U8_RGBA = 3
PF_U8_BGRA = 4
PF_F32_RGB = 5
PF_F32_RGBA = 6
PF_F32_R = 7
PF_F16_RGB = 8
PF_F16_RGBA = 9
PF_F16_R = 10
PF_U8_R = 11
PF_U8_RG = 12
msaa_samples = 4
rt_id = gh_render_target.create_rb(2048, 2048, PF_F32_RGBA, msaa_samples)
            


create_depth

Description

Creates a depth only render target.


Syntax

rt_id = gh_render_target.create_depth(
 width, height,
 linear_filtering
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
rt_id = gh_render_target.create_depth(2048, 2048, 0)
            


create_cubemap

Description

Creates a depth only render target.


Syntax

rt_id = gh_render_target.create_cubemap(
 size,
 create_color_cubemap,
 depth_conf,
 pixel_format,
 linear_filtering,
 clamp_addressing
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
PF_U8_RGBA = 3
rt_id = gh_render_target.create_cubemap(1024, 1, 1, PF_U8_RGBA, 1, 1)
            


cubemap_set_draw_face

Description

Specifies the target of drawing commands for a cubemap render target.


Syntax

gh_render_target.cubemap_set_draw_face(
 rt_id,
 face
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_render_target.cubemap_set_draw_face(rt_id, face)
            


kill

Description

Kills (cleanup + free resources) a render target.


Syntax

gh_render_target.kill(
 rt_id
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_render_target.kill(rt_id)
            


bind

Description

Binds the render target.


Syntax

gh_render_target.bind(
 rt_id
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_render_target.bind(rt_id)
...
gh_render_target.bind(0) -- unbinds
            


resize

Description

Resizes a render target.


Syntax

gh_render_target.resize(
 rt_id,
 width, height
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_render_target.resize(rt_id, new_width, new_height)
            


resolve_multisampling

Description

Resolves multisampling.


Syntax

gh_render_target.resolve_multisampling(
 rt_src,
 rt_dst
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_render_target.resolve_multisampling(ms_rt, rt)
            


use_with_syphon

Description

Specifies that this render target can be a source for Syphon (Mac OSX only).


Syntax

gh_render_target.use_with_syphon(
 rt_id
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_render_target.use_with_syphon(rt)
            






GeeXLab Rootard Guide | Downloads | Contact | Newsletter