|
Kohi Game Engine
|
#include "containers/array.h"#include "core_render_types.h"#include "core_resource_types.h"#include "defines.h"#include "identifiers/identifier.h"#include "math/math_types.h"#include "parsers/kson_parser.h"#include "strings/kname.h"Go to the source code of this file.
Data Structures | |
| struct | binary_asset_header |
| The primary header for binary assets, to be used for serialization. This should be the first member of the asset-specific binary file header. NOTE: Binary asset headers should be 32-bit aligned. More... | |
| struct | kasset_importer |
| Represents the interface point for an importer. More... | |
| struct | kasset_metadata |
| Various metadata included with the asset. More... | |
| struct | kasset |
| a structure meant to be included as the first member in the struct of all asset types for quick casting purposes. More... | |
| struct | kasset_heightmap_terrain |
| struct | kasset_image |
| struct | kasset_static_mesh_geometry |
| struct | kasset_static_mesh |
| Represents a static mesh asset. More... | |
| struct | kasset_material |
| struct | kasset_text |
| struct | kasset_binary |
| struct | kasset_kson |
| struct | kasset_scene |
| struct | kasset_shader_stage |
| struct | kasset_shader_attribute |
| struct | kasset_shader_uniform |
| Represents a shader uniform within a shader asset. More... | |
| struct | kasset_shader |
| Represents a shader asset, typically loaded from disk. More... | |
| struct | kasset_system_font_face |
| struct | kasset_system_font |
| struct | kasset_bitmap_font_glyph |
| struct | kasset_bitmap_font_kerning |
| struct | kasset_bitmap_font_page |
| struct | kasset_bitmap_font |
| struct | kasset_audio |
Macros | |
| #define | ASSET_MAGIC 0xcafebabe |
| A magic number indicating the file as a kohi binary asset file. More... | |
| #define | ASSET_MAGIC_U64 0xcafebabebadc0ffee |
| #define | KASSET_TYPE_MAX_LENGTH 64 |
| #define | KASSET_NAME_MAX_LENGTH 256 |
| #define | KPACKAGE_NAME_MAX_LENGTH 128 |
| #define | KASSET_FULLY_QUALIFIED_NAME_MAX_LENGTH = (KPACKAGE_NAME_MAX_LENGTH + KASSET_TYPE_MAX_LENGTH + KASSET_NAME_MAX_LENGTH + 2) |
| #define | KASSET_TYPE_NAME_HEIGHTMAP_TERRAIN "HeightmapTerrain" |
| #define | KASSET_TYPE_NAME_IMAGE "Image" |
| #define | KASSET_TYPE_NAME_STATIC_MESH "StaticMesh" |
| #define | KASSET_TYPE_NAME_MATERIAL "Material" |
| #define | KASSET_TYPE_NAME_TEXT "Text" |
| #define | KASSET_TYPE_NAME_BINARY "Binary" |
| #define | KASSET_TYPE_NAME_KSON "Kson" |
| #define | KASSET_TYPE_NAME_SCENE "Scene" |
| #define | KASSET_TYPE_NAME_SHADER "Shader" |
| #define | KASSET_TYPE_NAME_SYSTEM_FONT "SystemFont" |
| #define | KASSET_TYPE_NAME_BITMAP_FONT "BitmapFont" |
| #define | KASSET_TYPE_NAME_AUDIO "Audio" |
Typedefs | |
| typedef enum kasset_type | kasset_type |
| typedef struct binary_asset_header | binary_asset_header |
| The primary header for binary assets, to be used for serialization. This should be the first member of the asset-specific binary file header. NOTE: Binary asset headers should be 32-bit aligned. More... | |
| typedef enum asset_request_result | asset_request_result |
| typedef void(* | PFN_kasset_on_result) (asset_request_result result, const struct kasset *asset, void *listener_inst) |
| A function pointer typedef to be used to provide the asset asset_system with a calback function when asset loading is complete or failed. This process is asynchronus. More... | |
| typedef void(* | PFN_kasset_on_hot_reload) (const struct vfs_asset_data *asset_data, const struct kasset *asset) |
| A function pointer typedef to be used to provide the asset system with a callback function when an asset is written to on-disk (i.e. a hot-reload). This process is synchronous. More... | |
| typedef b8(* | PFN_kasset_importer_import) (const struct kasset_importer *self, u64 data_size, const void *data, void *params, struct kasset *out_asset) |
| Imports an asset according to the provided params and the importer's internal logic. NOTE: Some importers (i.e. .obj for static meshes) can also trigger imports of other assets. Those assets are immediately serialized to disk/package and not returned here though. More... | |
| typedef struct kasset_importer | kasset_importer |
| Represents the interface point for an importer. More... | |
| typedef struct kasset_metadata | kasset_metadata |
| Various metadata included with the asset. More... | |
| typedef struct kasset | kasset |
| a structure meant to be included as the first member in the struct of all asset types for quick casting purposes. More... | |
| typedef struct kasset_heightmap_terrain | kasset_heightmap_terrain |
| typedef struct kasset_image | kasset_image |
| typedef struct kasset_static_mesh_geometry | kasset_static_mesh_geometry |
| typedef struct kasset_static_mesh | kasset_static_mesh |
| Represents a static mesh asset. More... | |
| typedef struct kasset_material | kasset_material |
| typedef struct kasset_text | kasset_text |
| typedef struct kasset_binary | kasset_binary |
| typedef struct kasset_kson | kasset_kson |
| typedef struct kasset_scene | kasset_scene |
| typedef struct kasset_shader_stage | kasset_shader_stage |
| typedef struct kasset_shader_attribute | kasset_shader_attribute |
| typedef struct kasset_shader_uniform | kasset_shader_uniform |
| Represents a shader uniform within a shader asset. More... | |
| typedef struct kasset_shader | kasset_shader |
| Represents a shader asset, typically loaded from disk. More... | |
| typedef struct kasset_system_font_face | kasset_system_font_face |
| typedef struct kasset_system_font | kasset_system_font |
| typedef struct kasset_bitmap_font_glyph | kasset_bitmap_font_glyph |
| typedef struct kasset_bitmap_font_kerning | kasset_bitmap_font_kerning |
| typedef struct kasset_bitmap_font_page | kasset_bitmap_font_page |
| typedef struct kasset_bitmap_font | kasset_bitmap_font |
| typedef struct kasset_audio | kasset_audio |
Functions | |
| ARRAY_TYPE (kasset_bitmap_font_glyph) | |
| ARRAY_TYPE (kasset_bitmap_font_kerning) | |
| ARRAY_TYPE (kasset_bitmap_font_page) | |
| #define ASSET_MAGIC 0xcafebabe |
A magic number indicating the file as a kohi binary asset file.
| #define ASSET_MAGIC_U64 0xcafebabebadc0ffee |
| #define KASSET_FULLY_QUALIFIED_NAME_MAX_LENGTH = (KPACKAGE_NAME_MAX_LENGTH + KASSET_TYPE_MAX_LENGTH + KASSET_NAME_MAX_LENGTH + 2) |
| #define KASSET_NAME_MAX_LENGTH 256 |
| #define KASSET_TYPE_MAX_LENGTH 64 |
| #define KASSET_TYPE_NAME_AUDIO "Audio" |
| #define KASSET_TYPE_NAME_BINARY "Binary" |
| #define KASSET_TYPE_NAME_BITMAP_FONT "BitmapFont" |
| #define KASSET_TYPE_NAME_HEIGHTMAP_TERRAIN "HeightmapTerrain" |
| #define KASSET_TYPE_NAME_IMAGE "Image" |
| #define KASSET_TYPE_NAME_KSON "Kson" |
| #define KASSET_TYPE_NAME_MATERIAL "Material" |
| #define KASSET_TYPE_NAME_SCENE "Scene" |
| #define KASSET_TYPE_NAME_SHADER "Shader" |
| #define KASSET_TYPE_NAME_STATIC_MESH "StaticMesh" |
| #define KASSET_TYPE_NAME_SYSTEM_FONT "SystemFont" |
| #define KASSET_TYPE_NAME_TEXT "Text" |
| #define KPACKAGE_NAME_MAX_LENGTH 128 |
| typedef enum asset_request_result asset_request_result |
| typedef struct binary_asset_header binary_asset_header |
The primary header for binary assets, to be used for serialization. This should be the first member of the asset-specific binary file header. NOTE: Binary asset headers should be 32-bit aligned.
a structure meant to be included as the first member in the struct of all asset types for quick casting purposes.
| typedef struct kasset_audio kasset_audio |
Represents a Kohi Audio asset.
| typedef struct kasset_binary kasset_binary |
| typedef struct kasset_bitmap_font kasset_bitmap_font |
| typedef struct kasset_bitmap_font_glyph kasset_bitmap_font_glyph |
| typedef struct kasset_bitmap_font_kerning kasset_bitmap_font_kerning |
| typedef struct kasset_bitmap_font_page kasset_bitmap_font_page |
| typedef struct kasset_heightmap_terrain kasset_heightmap_terrain |
| typedef struct kasset_image kasset_image |
| typedef struct kasset_importer kasset_importer |
Represents the interface point for an importer.
| typedef struct kasset_kson kasset_kson |
| typedef struct kasset_material kasset_material |
| typedef struct kasset_metadata kasset_metadata |
Various metadata included with the asset.
| typedef struct kasset_scene kasset_scene |
| typedef struct kasset_shader kasset_shader |
Represents a shader asset, typically loaded from disk.
| typedef struct kasset_shader_attribute kasset_shader_attribute |
| typedef struct kasset_shader_stage kasset_shader_stage |
| typedef struct kasset_shader_uniform kasset_shader_uniform |
Represents a shader uniform within a shader asset.
| typedef struct kasset_static_mesh kasset_static_mesh |
Represents a static mesh asset.
| typedef struct kasset_static_mesh_geometry kasset_static_mesh_geometry |
| typedef struct kasset_system_font kasset_system_font |
| typedef struct kasset_system_font_face kasset_system_font_face |
| typedef struct kasset_text kasset_text |
| typedef enum kasset_type kasset_type |
| typedef b8(* PFN_kasset_importer_import) (const struct kasset_importer *self, u64 data_size, const void *data, void *params, struct kasset *out_asset) |
Imports an asset according to the provided params and the importer's internal logic. NOTE: Some importers (i.e. .obj for static meshes) can also trigger imports of other assets. Those assets are immediately serialized to disk/package and not returned here though.
| self | A constant pointer to the importer itself. |
| data_size | The size of the data being imported. |
| data | A constant pointer to a block of memory containing the data being imported. |
| params | A block of memory containing parameters for the import. Optional in general, but required by some importers. |
| out_asset | A pointer to the asset being imported. |
| typedef void(* PFN_kasset_on_hot_reload) (const struct vfs_asset_data *asset_data, const struct kasset *asset) |
A function pointer typedef to be used to provide the asset system with a callback function when an asset is written to on-disk (i.e. a hot-reload). This process is synchronous.
| typedef void(* PFN_kasset_on_result) (asset_request_result result, const struct kasset *asset, void *listener_inst) |
A function pointer typedef to be used to provide the asset asset_system with a calback function when asset loading is complete or failed. This process is asynchronus.
| result | The result of the asset request. |
| asset | A constant pointer to the asset that is loaded. |
| listener_inst | A pointer to the listener, usually passed along with the original request. |
| enum asset_request_result |
| enum kasset_type |
| ARRAY_TYPE | ( | kasset_bitmap_font_glyph | ) |
| ARRAY_TYPE | ( | kasset_bitmap_font_kerning | ) |
| ARRAY_TYPE | ( | kasset_bitmap_font_page | ) |