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

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



bind

Description

Binds the render target.


Syntax

gh_render_target.bind(
 rt_id
)

Languages


Parameters


Return Values

This function has no return value(s).


Code sample


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


create

Description

Creates a render target.


Syntax

rt_id = gh_render_target.create(
 width, height
)

Languages


Parameters


Return Values


Code sample


rt_id = gh_render_target.create(2048, 2048)
			


create_cubemap

Description

Creates a depth only render target.


Syntax

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

Languages


Parameters


Return Values


Code sample


PF_U8_RGBA = 3

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


create_depth

Description

Creates a depth only render target.


Syntax

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

Languages


Parameters


Return Values


Code sample


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


create_ex

Description

Creates a render target.


Syntax

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

Languages


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,
 pf,
 linear_filtering,
 clamp_addressing,
 msaa_samples
)

Languages


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

num_color_targets = 4
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_ex_v4

Description

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


Syntax

rt_id = gh_render_target.create_ex_v4(
 width, height,
 num_color_targets,
 pf,
 linear_filtering,
 clamp_addressing,
 msaa_samples,
 create_depth_texture
)

Languages


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

num_color_targets = 4
linear_filtering = 1
clamp_addressing = 1
msaa_samples = 4
create_depth_texture = 1

rt_id = gh_render_target.create_ex_v4(2048, 2048, num_color_targets, PF_F32_RGBA, linear_filtering, msaa_samples, create_depth_texture)
			


create_ex_v5

Description

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


Syntax

rt_id = gh_render_target.create_ex_v5(
 width, height,
 num_color_targets,
 pf,
 linear_filtering,
 clamp_addressing,
 msaa_samples,
 create_depth_texture,
 gen_mipmaps
)

Languages


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

num_color_targets = 4
linear_filtering = 1
clamp_addressing = 1
msaa_samples = 4
create_depth_texture = 1
gen_mipmaps = 0

rt_id = gh_render_target.create_ex_v5(2048, 2048, num_color_targets, PF_F32_RGBA, linear_filtering, msaa_samples, create_depth_texture, gen_mipmaps)
			


create_rb

Description

Creates a color depth render buffer.


Syntax

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

Languages


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


Parameters


Return Values


Code sample


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


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


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


Parameters


Return Values

This function has no return value(s).


Code sample


gh_render_target.kill(rt_id)
			


resize

Description

Resizes a render target.


Syntax

gh_render_target.resize(
 rt_id,
 width, height
)

Languages


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


Parameters


Return Values

This function has no return value(s).


Code sample


gh_render_target.resolve_multisampling(rt_src, rt_dst)
			


use_with_syphon

Description

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


Syntax

gh_render_target.use_with_syphon(
 rt_id
)

Languages


Parameters


Return Values

This function has no return value(s).


Code sample


gh_render_target.use_with_syphon(rt_id)
			






GeeXLab Rootard Guide | Downloads | Contact | Newsletter