![]() |
![]() |
![]() |
clutk Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#define CTK_TYPE_RENDER_TARGET CtkRenderTarget; enum CtkRenderTargetFlags; GType ctk_render_target_get_type (void
); CtkRenderTarget * ctk_render_target_new (void
); CtkRenderTarget * ctk_render_target_new_sized (guint width
,guint height
); void ctk_render_target_resize (CtkRenderTarget *self
,guint width
,guint height
); void ctk_render_target_free (CtkRenderTarget *self
); void ctk_render_target_bind (CtkRenderTarget *self
); void ctk_render_target_unbind (void
); guint ctk_render_target_get_width (CtkRenderTarget *self
); guint ctk_render_target_get_height (CtkRenderTarget *self
); guint ctk_render_target_get_depth_buffer_ogl_id (CtkRenderTarget *self
); guint ctk_render_target_get_color_buffer_ogl_id (CtkRenderTarget *self
); guint ctk_render_target_get_frame_buffer_ogl_id (CtkRenderTarget *self
); void ctk_render_target_get_size (CtkRenderTarget *self
,guint *width
,guint *height
); CtkRenderTargetFlags ctk_render_target_get_flags (CtkRenderTarget *self
); void ctk_render_target_set_flags (CtkRenderTarget *self
,CtkRenderTargetFlags flags
);
typedef enum { CTK_RENDER_TARGET_IN_USE = 1 << 0, CTK_RENDER_TARGET_STACKED = 1 << 1 } CtkRenderTargetFlags;
CtkRenderTarget * ctk_render_target_new (void
);
Creates a new CtkRenderTarget with only the fbo set
Returns : |
a new CtkRenderTarget |
CtkRenderTarget * ctk_render_target_new_sized (guint width
,guint height
);
As ctk_render_target_new, but the CtkRenderTarget
will also have a sized
texture attached if width
and height
are non-zero
|
the width of the desired texture, can be zero |
|
the height of the desired texture, can be zero |
Returns : |
a new CtkRenderTarget |
void ctk_render_target_resize (CtkRenderTarget *self
,guint width
,guint height
);
Will resize the texture associated with self
.
WARNING: This function changes the binding of the render target. Calling this
function will replace the previous render-target that was bound to the
framebuffer
|
the CtkRenderTarget to resize |
|
the width of the desired texture |
|
the height of the desired texture |
void ctk_render_target_free (CtkRenderTarget *self
);
Will free itself, plus any memory allocated for any textures that are present.
|
the CtkRenderTarget to free |
void ctk_render_target_bind (CtkRenderTarget *self
);
Will bind self
(and it's texture, if it exists) to the framebuffer
|
the CtkRenderTarget to bind |
void ctk_render_target_unbind (void
);
Will unbind self
from the framebuffer
guint ctk_render_target_get_width (CtkRenderTarget *self
);
Will retrieve the width of self
|
a CtkRenderTarget |
Returns : |
the width of self
|
guint ctk_render_target_get_height (CtkRenderTarget *self
);
Will retrieve the opengl id of the frame buffer of self
|
a CtkRenderTarget |
Returns : |
the opengl id of the frame buffer of self
|
guint ctk_render_target_get_depth_buffer_ogl_id
(CtkRenderTarget *self
);
|
|
Returns : |
guint ctk_render_target_get_color_buffer_ogl_id
(CtkRenderTarget *self
);
|
|
Returns : |
guint ctk_render_target_get_frame_buffer_ogl_id
(CtkRenderTarget *self
);
|
|
Returns : |
void ctk_render_target_get_size (CtkRenderTarget *self
,guint *width
,guint *height
);
Will populate width
and height
with the size of self
|
a CtkRenderTarget |
|
a location to store the width. [out] |
|
a location to store the height. [out] |
CtkRenderTargetFlags ctk_render_target_get_flags (CtkRenderTarget *self
);
|
a CtkRenderTarget |
Returns : |
the current CtkRenderTargetFlags for self
|
void ctk_render_target_set_flags (CtkRenderTarget *self
,CtkRenderTargetFlags flags
);
Sets the CtkRenderTargetFlags of self
to flags
|
a CtkRenderTarget |
|
CtkRenderTargetFlags |