#pragma once #include #include #include "rendertarget.h" #include "shader.h" #include "vertexstructure.h" #include #include #include /*! \file graphics.h \brief Contains the base G5-functionality. */ #ifdef __cplusplus extern "C" { #endif KINC_FUNC extern bool kinc_g5_fullscreen; /// /// Returns whether raytracing (see kinc/graphics5/raytrace.h) is supported. /// /// Whether raytracing is supported KINC_FUNC bool kinc_g5_supports_raytracing(void); /// /// Returns whether instanced rendering (kinc_g5_command_list_draw_indexed_vertices_instanced and pals) is supported. /// /// Whether instanced rendering is supported KINC_FUNC bool kinc_g5_supports_instanced_rendering(void); /// /// Returns whether GPU-compute (the functions in kinc/graphics5/compute.h) is supported. /// /// Whether GPU-compute is supported KINC_FUNC bool kinc_g5_supports_compute_shaders(void); /// /// Returns whether blend-constants (see kinc_g4_set_blend_constant and the blending-properties for pipelines) are supported. /// /// Whether blend-constants are supported KINC_FUNC bool kinc_g5_supports_blend_constants(void); /// /// Returns whether textures are supported which have widths/heights which are not powers of two. /// /// Whether non power of two texture-sizes are supported KINC_FUNC bool kinc_g5_supports_non_pow2_textures(void); /// /// Returns whether render-targets are upside down. This happens in OpenGL and there is currently no automatic mitigation. /// /// Whether render-targets are upside down KINC_FUNC bool kinc_g5_render_targets_inverted_y(void); /// /// Returns how many textures can be used at the same time in a fragment-shader. /// /// The number of textures KINC_FUNC int kinc_g5_max_bound_textures(void); /// /// I think this does nothing. /// KINC_FUNC void kinc_g5_flush(void); /// /// Returns the currently used number of samples for hardware-antialiasing. /// /// The number of samples KINC_FUNC int kinc_g5_antialiasing_samples(void); /// /// 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. /// /// The number of samples KINC_FUNC void kinc_g5_set_antialiasing_samples(int samples); /// /// Needs to be called before rendering to a window. Typically called at the start of each frame. /// /// The window to render to KINC_FUNC void kinc_g5_begin(kinc_g5_render_target_t *renderTarget, int window); /// /// Needs to be called after rendering to a window. Typically called at the end of each frame. /// /// The window to render to /// KINC_FUNC void kinc_g5_end(int window); /// /// Needs to be called to make the rendered frame visible. Typically called at the very end of each frame. /// KINC_FUNC bool kinc_g5_swap_buffers(void); #ifndef KINC_DOCS void kinc_g5_internal_init(void); void kinc_g5_internal_init_window(int window, int depth_buffer_bits, int stencil_buffer_bits, bool vsync); void kinc_g5_internal_destroy_window(int window); void kinc_g5_internal_destroy(void); #endif #ifdef __cplusplus } #endif