Kore
Loading...
Searching...
No Matches
rendertarget.h
Go to the documentation of this file.
1#pragma once
2
3#include <kinc/global.h>
4
5#include "textureunit.h"
6
7#include <kinc/backend/graphics5/rendertarget.h>
8
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17typedef enum kinc_g5_render_target_format {
18 KINC_G5_RENDER_TARGET_FORMAT_32BIT,
19 KINC_G5_RENDER_TARGET_FORMAT_64BIT_FLOAT,
20 KINC_G5_RENDER_TARGET_FORMAT_32BIT_RED_FLOAT,
21 KINC_G5_RENDER_TARGET_FORMAT_128BIT_FLOAT,
22 KINC_G5_RENDER_TARGET_FORMAT_16BIT_DEPTH,
23 KINC_G5_RENDER_TARGET_FORMAT_8BIT_RED,
24 KINC_G5_RENDER_TARGET_FORMAT_16BIT_RED_FLOAT,
25 KINC_G5_RENDER_TARGET_FORMAT_64BIT_INTEGER
26} kinc_g5_render_target_format_t;
27
28typedef struct kinc_g5_render_target {
29 int width;
30 int height;
31 int texWidth;
32 int texHeight;
33 int framebuffer_index;
34 bool isCubeMap;
35 bool isDepthAttachment;
36 RenderTarget5Impl impl;
37} kinc_g5_render_target_t;
38
49KINC_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,
50 int stencilBufferBits);
51
63KINC_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,
64 int depthBufferBits, int stencilBufferBits, int samples_per_pixel);
65
76KINC_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,
77 int depthBufferBits, int stencilBufferBits);
78
90KINC_FUNC void kinc_g5_render_target_init_framebuffer_with_multisampling(kinc_g5_render_target_t *target, int width, int height,
91 kinc_g5_render_target_format_t format, int depthBufferBits, int stencilBufferBits,
92 int samples_per_pixel);
93
103KINC_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,
104 int stencilBufferBits);
105
116KINC_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,
117 int depthBufferBits, int stencilBufferBits, int samples_per_pixel);
118
123KINC_FUNC void kinc_g5_render_target_destroy(kinc_g5_render_target_t *target);
124
131KINC_FUNC void kinc_g5_render_target_set_depth_stencil_from(kinc_g5_render_target_t *target, kinc_g5_render_target_t *source);
132
133#ifdef __cplusplus
134}
135#endif
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
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_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.
Definition rendertarget.c.h:3
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....
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.
Definition rendertarget.c.h:13
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....
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.
Definition rendertarget.c.h:8
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.
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....
Provides a texture-unit-struct which is used for setting textures in a shader.
Definition rendertarget.h:28