Kohi Game Engine
|
#include "core_render_types.h"
Go to the source code of this file.
Functions | |
KAPI b8 | uniform_type_is_sampler (shader_uniform_type type) |
Indicates if the given shader uniform type is a sampler. More... | |
KAPI b8 | uniform_type_is_texture (shader_uniform_type type) |
Indicates if the given shader uniform type is a texture. More... | |
KAPI const char * | texture_repeat_to_string (texture_repeat repeat) |
Returns the string representation of the given texture repeat. More... | |
KAPI texture_repeat | string_to_texture_repeat (const char *str) |
Converts the given string into a texture repeat. Case-insensitive. More... | |
KAPI const char * | texture_filter_mode_to_string (texture_filter filter) |
Returns the string representation of the given texture filter. More... | |
KAPI texture_filter | string_to_texture_filter_mode (const char *str) |
Converts the given string into a texture filter. Case-insensitive. More... | |
KAPI const char * | texture_channel_to_string (texture_channel channel) |
KAPI texture_channel | string_to_texture_channel (const char *str) |
KAPI const char * | shader_uniform_type_to_string (shader_uniform_type type) |
Returns the string representation of the given shader uniform type. More... | |
KAPI shader_uniform_type | string_to_shader_uniform_type (const char *str) |
Converts the given string into a shader uniform type. Case-insensitive. More... | |
KAPI const char * | shader_attribute_type_to_string (shader_attribute_type type) |
Returns the string representation of the given shader attribute type. More... | |
KAPI shader_attribute_type | string_to_shader_attribute_type (const char *str) |
Converts the given string into a shader attribute type. Case-insensitive. More... | |
KAPI const char * | shader_stage_to_string (shader_stage stage) |
Returns the string representation of the given shader stage. More... | |
KAPI shader_stage | string_to_shader_stage (const char *str) |
Converts the given string into a shader stage. Case-insensitive. More... | |
KAPI const char * | shader_update_frequency_to_string (shader_update_frequency frequency) |
Returns the string representation of the given shader update frequency. More... | |
KAPI shader_update_frequency | string_to_shader_update_frequency (const char *str) |
Converts the given string into a shader update frequency. Case-insensitive. More... | |
KAPI const char * | face_cull_mode_to_string (face_cull_mode mode) |
Returns the string representation of the given cull mode. More... | |
KAPI face_cull_mode | string_to_face_cull_mode (const char *str) |
Converts the given string to a face cull mode. More... | |
KAPI const char * | topology_type_to_string (primitive_topology_type_bits type) |
Returns the string representation of the given primitive topology type. More... | |
KAPI primitive_topology_type_bits | string_to_topology_type (const char *str) |
Converts the given string to a primitive topology type. More... | |
KAPI u16 | size_from_shader_attribute_type (shader_attribute_type type) |
Returns the size in bytes of the attribute type. More... | |
KAPI u16 | size_from_shader_uniform_type (shader_uniform_type type) |
Returns the size in bytes of the uniform type. More... | |
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. More... | |
KAPI u8 | channel_count_from_pixel_format (kpixel_format format) |
KAPI const char * | string_from_kpixel_format (kpixel_format format) |
Returns the string representation of the given kpixel_format. More... | |
KAPI kpixel_format | string_to_kpixel_format (const char *str) |
Converts the given string into a kpixel_format. Case-insensitive. More... | |
KAPI b8 | calculate_mip_levels_from_dimension (u32 width, u32 height) |
Calculate mip levels based on the given dimensions. More... | |
KAPI const char * | kmaterial_type_to_string (kmaterial_type type) |
Returns the string representation of the given material type. More... | |
KAPI kmaterial_type | string_to_kmaterial_type (const char *str) |
Converts the given string into a material type. Case-insensitive. More... | |
KAPI const char * | kmaterial_model_to_string (kmaterial_model model) |
Returns the string representation of the given material model. More... | |
KAPI kmaterial_model | string_to_kmaterial_model (const char *str) |
Converts the given string into a material model. Case-insensitive. More... | |
Calculate mip levels based on the given dimensions.
The number of mip levels is calculated by first taking the largest dimension (either width or height), figuring out how many times that number can be divided by 2, taking the floor value (rounding down) and adding 1 to represent the base level. This always leaves a value of at least 1.
width | The image width. |
height | The image height. |
KAPI u8 channel_count_from_pixel_format | ( | kpixel_format | format | ) |
Returns the number of channels for the given pixel format.
format | The pixel format. |
KAPI const char* face_cull_mode_to_string | ( | face_cull_mode | mode | ) |
Returns the string representation of the given cull mode.
KAPI const char* kmaterial_model_to_string | ( | kmaterial_model | model | ) |
Returns the string representation of the given material model.
KAPI const char* kmaterial_type_to_string | ( | kmaterial_type | type | ) |
Returns the string representation of the given material type.
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.
pixels | A constant array of pixel data. Channel size determined by format. @pixel_count The number of pixels in the array. |
format | The pixel format. |
KAPI const char* shader_attribute_type_to_string | ( | shader_attribute_type | type | ) |
Returns the string representation of the given shader attribute type.
KAPI const char* shader_stage_to_string | ( | shader_stage | stage | ) |
Returns the string representation of the given shader stage.
KAPI const char* shader_uniform_type_to_string | ( | shader_uniform_type | type | ) |
Returns the string representation of the given shader uniform type.
KAPI const char* shader_update_frequency_to_string | ( | shader_update_frequency | frequency | ) |
Returns the string representation of the given shader update frequency.
KAPI u16 size_from_shader_attribute_type | ( | shader_attribute_type | type | ) |
Returns the size in bytes of the attribute type.
KAPI u16 size_from_shader_uniform_type | ( | shader_uniform_type | type | ) |
Returns the size in bytes of the uniform type.
KAPI const char* string_from_kpixel_format | ( | kpixel_format | format | ) |
Returns the string representation of the given kpixel_format.
KAPI face_cull_mode string_to_face_cull_mode | ( | const char * | str | ) |
Converts the given string to a face cull mode.
KAPI kmaterial_model string_to_kmaterial_model | ( | const char * | str | ) |
Converts the given string into a material model. Case-insensitive.
KAPI kmaterial_type string_to_kmaterial_type | ( | const char * | str | ) |
Converts the given string into a material type. Case-insensitive.
KAPI kpixel_format string_to_kpixel_format | ( | const char * | str | ) |
Converts the given string into a kpixel_format. 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 shader_stage string_to_shader_stage | ( | const char * | str | ) |
Converts the given string into a shader stage. Case-insensitive.
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 texture_channel string_to_texture_channel | ( | const char * | str | ) |
KAPI texture_filter string_to_texture_filter_mode | ( | const char * | str | ) |
Converts the given string into a texture filter. Case-insensitive.
KAPI texture_repeat string_to_texture_repeat | ( | const char * | str | ) |
Converts the given string into a texture repeat. Case-insensitive.
KAPI primitive_topology_type_bits string_to_topology_type | ( | const char * | str | ) |
Converts the given string to a primitive topology type.
KAPI const char* texture_channel_to_string | ( | texture_channel | channel | ) |
KAPI const char* texture_filter_mode_to_string | ( | texture_filter | filter | ) |
Returns the string representation of the given texture filter.
KAPI const char* texture_repeat_to_string | ( | texture_repeat | repeat | ) |
Returns the string representation of the given texture repeat.
KAPI const char* topology_type_to_string | ( | primitive_topology_type_bits | type | ) |
Returns the string representation of the given primitive topology type.
KAPI b8 uniform_type_is_sampler | ( | shader_uniform_type | type | ) |
Indicates if the given shader uniform type is a sampler.
The | type to examine. |
KAPI b8 uniform_type_is_texture | ( | shader_uniform_type | type | ) |
Indicates if the given shader uniform type is a texture.
The | type to examine. |