Kohi Game Engine
render_type_utils.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "core_render_types.h"
4 
12 
20 
23 
26 
29 
32 
34 
36 
39 
42 
45 
48 
51 
54 
57 
60 
63 
66 
69 
72 
75 
78 
88 KAPI b8 pixel_data_has_transparency(const void* pixels, u32 pixel_count, kpixel_format format);
89 
97 
100 
103 
117 
120 
123 
126 
face_cull_mode
Determines face culling mode during rendering.
Definition: core_render_types.h:11
texture_channel
Definition: core_render_types.h:74
kmaterial_model
Definition: core_render_types.h:324
texture_filter
Represents supported texture filtering modes.
Definition: core_render_types.h:59
shader_attribute_type
Available attribute types.
Definition: core_render_types.h:102
shader_update_frequency
Defines shader update frequencies, typically used for uniforms.
Definition: core_render_types.h:92
kpixel_format
Represents the format of image (or texture) pixel data.
Definition: core_render_types.h:42
texture_repeat
Definition: core_render_types.h:66
shader_uniform_type
Available uniform types.
Definition: core_render_types.h:117
primitive_topology_type_bits
Definition: core_render_types.h:25
shader_stage
Shader stages available in the system.
Definition: core_render_types.h:82
kmaterial_type
Definition: core_render_types.h:315
#define KAPI
Import/export qualifier.
Definition: defines.h:205
unsigned int u32
Unsigned 32-bit integer.
Definition: defines.h:25
_Bool b8
8-bit boolean type
Definition: defines.h:58
unsigned short u16
Unsigned 16-bit integer.
Definition: defines.h:22
unsigned char u8
Unsigned 8-bit integer.
Definition: defines.h:19
KAPI shader_stage string_to_shader_stage(const char *str)
Converts the given string into a shader stage. Case-insensitive.
KAPI const char * shader_uniform_type_to_string(shader_uniform_type type)
Returns the string representation of the given shader uniform type.
KAPI texture_channel string_to_texture_channel(const char *str)
KAPI primitive_topology_type_bits string_to_topology_type(const char *str)
Converts the given string to a primitive topology type.
KAPI b8 calculate_mip_levels_from_dimension(u32 width, u32 height)
Calculate mip levels based on the given dimensions.
KAPI b8 uniform_type_is_texture(shader_uniform_type type)
Indicates if the given shader uniform type is a texture.
KAPI u16 size_from_shader_uniform_type(shader_uniform_type type)
Returns the size in bytes of the uniform type.
KAPI kmaterial_model string_to_kmaterial_model(const char *str)
Converts the given string into a material model. Case-insensitive.
KAPI const char * shader_stage_to_string(shader_stage stage)
Returns the string representation of the given shader stage.
KAPI b8 pixel_data_has_transparency(const void *pixels, u32 pixel_count, kpixel_format format)
Determines if any pixel has an alpha less than opaque.
KAPI kpixel_format string_to_kpixel_format(const char *str)
Converts the given string into a kpixel_format. Case-insensitive.
KAPI u8 channel_count_from_pixel_format(kpixel_format format)
KAPI const char * shader_update_frequency_to_string(shader_update_frequency frequency)
Returns the string representation of the given shader update frequency.
KAPI b8 uniform_type_is_sampler(shader_uniform_type type)
Indicates if the given shader uniform type is a sampler.
KAPI shader_uniform_type string_to_shader_uniform_type(const char *str)
Converts the given string into a shader uniform type. Case-insensitive.
KAPI shader_update_frequency string_to_shader_update_frequency(const char *str)
Converts the given string into a shader update frequency. Case-insensitive.
KAPI const char * face_cull_mode_to_string(face_cull_mode mode)
Returns the string representation of the given cull mode.
KAPI u16 size_from_shader_attribute_type(shader_attribute_type type)
Returns the size in bytes of the attribute type.
KAPI const char * texture_channel_to_string(texture_channel channel)
KAPI const char * kmaterial_type_to_string(kmaterial_type type)
Returns the string representation of the given material type.
KAPI const char * string_from_kpixel_format(kpixel_format format)
Returns the string representation of the given kpixel_format.
KAPI const char * kmaterial_model_to_string(kmaterial_model model)
Returns the string representation of the given material model.
KAPI texture_repeat string_to_texture_repeat(const char *str)
Converts the given string into a texture repeat. Case-insensitive.
KAPI kmaterial_type string_to_kmaterial_type(const char *str)
Converts the given string into a material type. Case-insensitive.
KAPI shader_attribute_type string_to_shader_attribute_type(const char *str)
Converts the given string into a shader attribute type. Case-insensitive.
KAPI const char * texture_filter_mode_to_string(texture_filter filter)
Returns the string representation of the given texture filter.
KAPI const char * topology_type_to_string(primitive_topology_type_bits type)
Returns the string representation of the given primitive topology type.
KAPI face_cull_mode string_to_face_cull_mode(const char *str)
Converts the given string to a face cull mode.
KAPI const char * texture_repeat_to_string(texture_repeat repeat)
Returns the string representation of the given texture repeat.
KAPI texture_filter string_to_texture_filter_mode(const char *str)
Converts the given string into a texture filter. Case-insensitive.
KAPI const char * shader_attribute_type_to_string(shader_attribute_type type)
Returns the string representation of the given shader attribute type.