5#include <kinc/backend/graphics4/rendertarget.h>
19typedef enum kinc_g4_render_target_format {
20 KINC_G4_RENDER_TARGET_FORMAT_32BIT,
21 KINC_G4_RENDER_TARGET_FORMAT_64BIT_FLOAT,
22 KINC_G4_RENDER_TARGET_FORMAT_32BIT_RED_FLOAT,
23 KINC_G4_RENDER_TARGET_FORMAT_128BIT_FLOAT,
24 KINC_G4_RENDER_TARGET_FORMAT_16BIT_DEPTH,
25 KINC_G4_RENDER_TARGET_FORMAT_8BIT_RED,
26 KINC_G4_RENDER_TARGET_FORMAT_16BIT_RED_FLOAT,
27 KINC_G4_RENDER_TARGET_FORMAT_64BIT_INTEGER
28} kinc_g4_render_target_format_t;
36 bool isDepthAttachment;
38 kinc_g4_render_target_impl_t impl;
39} kinc_g4_render_target_t;
50KINC_FUNC
void kinc_g4_render_target_init(kinc_g4_render_target_t *renderTarget,
int width,
int height, kinc_g4_render_target_format_t format,
51 int depthBufferBits,
int stencilBufferBits);
65 kinc_g4_render_target_format_t format,
int depthBufferBits,
int stencilBufferBits,
66 int samples_per_pixel);
77 int depthBufferBits,
int stencilBufferBits);
90 int depthBufferBits,
int stencilBufferBits,
int samples_per_pixel);
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
KINC_FUNC void kinc_g4_render_target_use_depth_as_texture(kinc_g4_render_target_t *renderTarget, kinc_g4_texture_unit_t unit)
Uses the depth-component of a render-target as a texture.
KINC_FUNC void kinc_g4_render_target_init(kinc_g4_render_target_t *renderTarget, int width, int height, kinc_g4_render_target_format_t format, int depthBufferBits, int stencilBufferBits)
Allocates and initializes a regular render-target. The contents of the render-target are undefined.
Definition rendertarget.c.h:3
KINC_FUNC void kinc_g4_render_target_set_depth_stencil_from(kinc_g4_render_target_t *renderTarget, kinc_g4_render_target_t *source)
Copies the depth and stencil-components of one render-target into another one.
KINC_FUNC void kinc_g4_render_target_destroy(kinc_g4_render_target_t *renderTarget)
Deallocates and destroys a render-target.
KINC_FUNC void kinc_g4_render_target_init_cube_with_multisampling(kinc_g4_render_target_t *renderTarget, int cubeMapSize, kinc_g4_render_target_format_t format, int depthBufferBits, int stencilBufferBits, int samples_per_pixel)
Allocates and initializes a multi-sampled render-target-cube-map. Can fall back to a non-multi-sample...
KINC_FUNC void kinc_g4_render_target_generate_mipmaps(kinc_g4_render_target_t *renderTarget, int levels)
Generates the mipmap-chain for a render-target.
KINC_FUNC void kinc_g4_render_target_get_pixels(kinc_g4_render_target_t *renderTarget, uint8_t *data)
Copies out the color-data from a render-target. Beware, this is very slow.
KINC_FUNC void kinc_g4_render_target_init_with_multisampling(kinc_g4_render_target_t *renderTarget, int width, int height, kinc_g4_render_target_format_t format, int depthBufferBits, int stencilBufferBits, int samples_per_pixel)
Allocates and initializes a multi-sampled render-target if possible - otherwise it falls back to a re...
KINC_FUNC void kinc_g4_render_target_use_color_as_texture(kinc_g4_render_target_t *renderTarget, kinc_g4_texture_unit_t unit)
Uses the color-component of a render-target as a texture.
KINC_FUNC void kinc_g4_render_target_init_cube(kinc_g4_render_target_t *renderTarget, int cubeMapSize, kinc_g4_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.
Definition rendertarget.c.h:8
Provides a texture-unit-struct which is used for setting textures in a shader.
Definition rendertarget.h:30