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

Contains the base G5-functionality. More...

#include <kinc/global.h>
#include <kinc/image.h>
#include "rendertarget.h"
#include "shader.h"
#include "vertexstructure.h"
#include <kinc/backend/graphics5/graphics.h>
#include <kinc/math/matrix.h>
#include <kinc/math/vector.h>

Go to the source code of this file.

Functions

KINC_FUNC bool kinc_g5_supports_raytracing (void)
 Returns whether raytracing (see kinc/graphics5/raytrace.h) is supported.
KINC_FUNC bool kinc_g5_supports_instanced_rendering (void)
 Returns whether instanced rendering (kinc_g5_command_list_draw_indexed_vertices_instanced and pals) is supported.
KINC_FUNC bool kinc_g5_supports_compute_shaders (void)
 Returns whether GPU-compute (the functions in kinc/compute/compute.h) is supported.
KINC_FUNC bool kinc_g5_supports_blend_constants (void)
 Returns whether blend-constants (see kinc_g4_set_blend_constant and the blending-properties for pipelines) are supported.
KINC_FUNC bool kinc_g5_supports_non_pow2_textures (void)
 Returns whether textures are supported which have widths/heights which are not powers of two.
KINC_FUNC bool kinc_g5_render_targets_inverted_y (void)
 Returns whether render-targets are upside down. This happens in OpenGL and there is currently no automatic mitigation.
KINC_FUNC int kinc_g5_max_bound_textures (void)
 Returns how many textures can be used at the same time in a fragment-shader.
KINC_FUNC void kinc_g5_flush (void)
 I think this does nothing.
KINC_FUNC int kinc_g5_antialiasing_samples (void)
 Returns the currently used number of samples for hardware-antialiasing.
KINC_FUNC void kinc_g5_set_antialiasing_samples (int samples)
 Sets the number of samples used for hardware-antialiasing. This typically uses multisampling and typically only works with a few specific numbers of sample-counts - 2 and 4 are pretty safe bets. It also might do nothing at all.
KINC_FUNC void kinc_g5_begin (kinc_g5_render_target_t *renderTarget, int window)
 Needs to be called before rendering to a window. Typically called at the start of each frame.
KINC_FUNC void kinc_g5_end (int window)
 Needs to be called after rendering to a window. Typically called at the end of each frame.
KINC_FUNC bool kinc_g5_swap_buffers (void)
 Needs to be called to make the rendered frame visible. Typically called at the very end of each frame.

Variables

KINC_FUNC bool kinc_g5_fullscreen

Detailed Description

Contains the base G5-functionality.

Function Documentation

◆ kinc_g5_antialiasing_samples()

KINC_FUNC int kinc_g5_antialiasing_samples ( void )

Returns the currently used number of samples for hardware-antialiasing.

Returns
The number of samples

◆ kinc_g5_begin()

KINC_FUNC void kinc_g5_begin ( kinc_g5_render_target_t * renderTarget,
int window )

Needs to be called before rendering to a window. Typically called at the start of each frame.

Parameters
windowThe window to render to

◆ kinc_g5_end()

KINC_FUNC void kinc_g5_end ( int window)

Needs to be called after rendering to a window. Typically called at the end of each frame.

Parameters
windowThe window to render to
Returns

◆ kinc_g5_max_bound_textures()

KINC_FUNC int kinc_g5_max_bound_textures ( void )

Returns how many textures can be used at the same time in a fragment-shader.

Returns
The number of textures

◆ kinc_g5_render_targets_inverted_y()

KINC_FUNC bool kinc_g5_render_targets_inverted_y ( void )

Returns whether render-targets are upside down. This happens in OpenGL and there is currently no automatic mitigation.

Returns
Whether render-targets are upside down

◆ kinc_g5_set_antialiasing_samples()

KINC_FUNC void kinc_g5_set_antialiasing_samples ( int samples)

Sets the number of samples used for hardware-antialiasing. This typically uses multisampling and typically only works with a few specific numbers of sample-counts - 2 and 4 are pretty safe bets. It also might do nothing at all.

Parameters
samplesThe number of samples

◆ kinc_g5_supports_blend_constants()

KINC_FUNC bool kinc_g5_supports_blend_constants ( void )

Returns whether blend-constants (see kinc_g4_set_blend_constant and the blending-properties for pipelines) are supported.

Returns
Whether blend-constants are supported

◆ kinc_g5_supports_compute_shaders()

KINC_FUNC bool kinc_g5_supports_compute_shaders ( void )

Returns whether GPU-compute (the functions in kinc/compute/compute.h) is supported.

Returns
Whether GPU-compute is supported

◆ kinc_g5_supports_instanced_rendering()

KINC_FUNC bool kinc_g5_supports_instanced_rendering ( void )

Returns whether instanced rendering (kinc_g5_command_list_draw_indexed_vertices_instanced and pals) is supported.

Returns
Whether instanced rendering is supported

◆ kinc_g5_supports_non_pow2_textures()

KINC_FUNC bool kinc_g5_supports_non_pow2_textures ( void )

Returns whether textures are supported which have widths/heights which are not powers of two.

Returns
Whether non power of two texture-sizes are supported

◆ kinc_g5_supports_raytracing()

KINC_FUNC bool kinc_g5_supports_raytracing ( void )

Returns whether raytracing (see kinc/graphics5/raytrace.h) is supported.

Returns
Whether raytracing is supported