Kore
Loading...
Searching...
No Matches
rendertarget.h File Reference

Provides functions for handling render-targets. More...

#include <kinc/global.h>
#include "textureunit.h"
#include <kinc/backend/graphics5/rendertarget.h>

Go to the source code of this file.

Data Structures

struct  kinc_g5_render_target

Typedefs

typedef enum kinc_g5_render_target_format kinc_g5_render_target_format_t
typedef struct kinc_g5_render_target kinc_g5_render_target_t

Enumerations

enum  kinc_g5_render_target_format {
  KINC_G5_RENDER_TARGET_FORMAT_32BIT , KINC_G5_RENDER_TARGET_FORMAT_64BIT_FLOAT , KINC_G5_RENDER_TARGET_FORMAT_32BIT_RED_FLOAT , KINC_G5_RENDER_TARGET_FORMAT_128BIT_FLOAT ,
  KINC_G5_RENDER_TARGET_FORMAT_16BIT_DEPTH , KINC_G5_RENDER_TARGET_FORMAT_8BIT_RED , KINC_G5_RENDER_TARGET_FORMAT_16BIT_RED_FLOAT , KINC_G5_RENDER_TARGET_FORMAT_64BIT_INTEGER
}

Functions

KINC_FUNC void kinc_g5_render_target_init (kinc_g5_render_target_t *target, int width, int height, kinc_g5_render_target_format_t format, int depthBufferBits, int stencilBufferBits)
 Allocates and initializes a regular render-target. The contents of the render-target are undefined.
KINC_FUNC void kinc_g5_render_target_init_with_multisampling (kinc_g5_render_target_t *target, int width, int height, kinc_g5_render_target_format_t format, int depthBufferBits, int stencilBufferBits, int samples_per_pixel)
 Allocates and initializes a regular render-target. Can fall back to a regular render-target. The contents of the render-target are undefined.
KINC_FUNC void kinc_g5_render_target_init_framebuffer (kinc_g5_render_target_t *target, int width, int height, kinc_g5_render_target_format_t format, int depthBufferBits, int stencilBufferBits)
 Allocates and initializes a framebuffer. The contents of the framebuffer are undefined.
KINC_FUNC void kinc_g5_render_target_init_framebuffer_with_multisampling (kinc_g5_render_target_t *target, int width, int height, kinc_g5_render_target_format_t format, int depthBufferBits, int stencilBufferBits, int samples_per_pixel)
 Allocates and initializes a multisampled framebuffer. Can fall back to a regular framebuffer. The contents of the framebuffer are undefined.
KINC_FUNC void kinc_g5_render_target_init_cube (kinc_g5_render_target_t *target, int cubeMapSize, kinc_g5_render_target_format_t format, int depthBufferBits, int stencilBufferBits)
 Allocates and initializes a render-target-cube-map. The contents of the render-target are undefined.
KINC_FUNC void kinc_g5_render_target_init_cube_with_multisampling (kinc_g5_render_target_t *target, int cubeMapSize, kinc_g5_render_target_format_t format, int depthBufferBits, int stencilBufferBits, int samples_per_pixel)
 Allocates and initializes a multisampled render-target-cube-map. Can fall back to a regular cube-map. The contents of the render-target are undefined.
KINC_FUNC void kinc_g5_render_target_destroy (kinc_g5_render_target_t *target)
 Deallocates and destroys a render-target.
KINC_FUNC void kinc_g5_render_target_set_depth_stencil_from (kinc_g5_render_target_t *target, kinc_g5_render_target_t *source)
 Copies the depth and stencil-components of one render-target into another one.

Detailed Description

Provides functions for handling render-targets.

Function Documentation

◆ kinc_g5_render_target_destroy()

KINC_FUNC void kinc_g5_render_target_destroy ( kinc_g5_render_target_t * target)

Deallocates and destroys a render-target.

Parameters
renderTargetThe render-target to destroy

◆ kinc_g5_render_target_init()

KINC_FUNC void kinc_g5_render_target_init ( kinc_g5_render_target_t * target,
int width,
int height,
kinc_g5_render_target_format_t format,
int depthBufferBits,
int stencilBufferBits )

Allocates and initializes a regular render-target. The contents of the render-target are undefined.

Parameters
target
width
height
format
depthBufferBits
stencilBufferBits
Returns

◆ kinc_g5_render_target_init_cube()

KINC_FUNC void kinc_g5_render_target_init_cube ( kinc_g5_render_target_t * target,
int cubeMapSize,
kinc_g5_render_target_format_t format,
int depthBufferBits,
int stencilBufferBits )

Allocates and initializes a render-target-cube-map. The contents of the render-target are undefined.

Parameters
target
cubeMapSize
format
depthBufferBits
stencilBufferBits
Returns

◆ kinc_g5_render_target_init_cube_with_multisampling()

KINC_FUNC void kinc_g5_render_target_init_cube_with_multisampling ( kinc_g5_render_target_t * target,
int cubeMapSize,
kinc_g5_render_target_format_t format,
int depthBufferBits,
int stencilBufferBits,
int samples_per_pixel )

Allocates and initializes a multisampled render-target-cube-map. Can fall back to a regular cube-map. The contents of the render-target are undefined.

Parameters
target
cubeMapSize
format
depthBufferBits
stencilBufferBits
samples_per_pixel
Returns

◆ kinc_g5_render_target_init_framebuffer()

KINC_FUNC void kinc_g5_render_target_init_framebuffer ( kinc_g5_render_target_t * target,
int width,
int height,
kinc_g5_render_target_format_t format,
int depthBufferBits,
int stencilBufferBits )

Allocates and initializes a framebuffer. The contents of the framebuffer are undefined.

Parameters
target
width
height
format
depthBufferBits
stencilBufferBits
Returns

◆ kinc_g5_render_target_init_framebuffer_with_multisampling()

KINC_FUNC void kinc_g5_render_target_init_framebuffer_with_multisampling ( kinc_g5_render_target_t * target,
int width,
int height,
kinc_g5_render_target_format_t format,
int depthBufferBits,
int stencilBufferBits,
int samples_per_pixel )

Allocates and initializes a multisampled framebuffer. Can fall back to a regular framebuffer. The contents of the framebuffer are undefined.

Parameters
target
width
height
format
depthBufferBits
stencilBufferBits
samples_per_pixel
Returns

◆ kinc_g5_render_target_init_with_multisampling()

KINC_FUNC void kinc_g5_render_target_init_with_multisampling ( kinc_g5_render_target_t * target,
int width,
int height,
kinc_g5_render_target_format_t format,
int depthBufferBits,
int stencilBufferBits,
int samples_per_pixel )

Allocates and initializes a regular render-target. Can fall back to a regular render-target. The contents of the render-target are undefined.

Parameters
target
width
height
format
depthBufferBits
stencilBufferBits
samples_per_pixel
Returns

◆ kinc_g5_render_target_set_depth_stencil_from()

KINC_FUNC void kinc_g5_render_target_set_depth_stencil_from ( kinc_g5_render_target_t * target,
kinc_g5_render_target_t * source )

Copies the depth and stencil-components of one render-target into another one.

Parameters
renderTargetThe render-target to copy the data into
sourceThe render-target from which to copy the data
Returns