26 #define DEFAULT_TEXTURE_NAME "default"
29 #define DEFAULT_DIFFUSE_TEXTURE_NAME "default_DIFF"
32 #define DEFAULT_SPECULAR_TEXTURE_NAME "default_SPEC"
35 #define DEFAULT_NORMAL_TEXTURE_NAME "default_NORM"
#define KAPI
Import/export qualifier.
Definition: defines.h:177
unsigned int u32
Unsigned 32-bit integer.
Definition: defines.h:25
_Bool b8
8-bit boolean type
Definition: defines.h:58
unsigned long long u64
Unsigned 64-bit integer.
Definition: defines.h:28
unsigned char u8
Unsigned 8-bit integer.
Definition: defines.h:19
The texture system configuration.
Definition: texture_system.h:20
u32 max_texture_count
The maximum number of textures that can be loaded at once.
Definition: texture_system.h:22
Represents a texture.
Definition: resource_types.h:165
KAPI texture * texture_system_acquire_writeable(const char *name, u32 width, u32 height, u8 channel_count, b8 has_transparency)
Attempts to acquire a writeable texture with the given name. This does not point to nor attempt to lo...
KAPI void texture_system_wrap_internal(const char *name, u32 width, u32 height, u8 channel_count, b8 has_transparency, b8 is_writeable, b8 register_texture, void *internal_data, texture *out_texture)
Wraps the provided internal data in a texture structure using the parameters provided....
b8 texture_system_initialize(u64 *memory_requirement, void *state, void *config)
Initializes the texture system. Should be called twice; once to get the memory requirement (passing s...
void texture_system_shutdown(void *state)
Shuts down the texture system.
KAPI texture * texture_system_get_default_diffuse_texture(void)
Gets a pointer to the default diffuse texture. No reference counting is done for default textures.
struct texture_system_config texture_system_config
The texture system configuration.
KAPI b8 texture_system_set_internal(texture *t, void *internal_data)
Sets the internal data of a texture. Useful for replacing internal data from within the renderer for ...
KAPI b8 texture_system_write_data(texture *t, u32 offset, u32 size, void *data)
Writes the given data to the provided texture. May only be used on writeable textures.
KAPI texture * texture_system_acquire_cube(const char *name, b8 auto_release)
Attempts to acquire a cubemap texture with the given name. If it has not yet been loaded,...
KAPI texture * texture_system_get_default_texture(void)
Gets a pointer to the default texture. No reference counting is done for default textures.
KAPI texture * texture_system_acquire(const char *name, b8 auto_release)
Attempts to acquire a texture with the given name. If it has not yet been loaded, this triggers it to...
KAPI texture * texture_system_get_default_specular_texture(void)
Gets a pointer to the default specular texture. No reference counting is done for default textures.
KAPI texture * texture_system_get_default_normal_texture(void)
Gets a pointer to the default normal texture. No reference counting is done for default textures.
KAPI void texture_system_release(const char *name)
Releases a texture with the given name. Ignores non-existant textures. Decreases the reference counte...
KAPI b8 texture_system_resize(texture *t, u32 width, u32 height, b8 regenerate_internal_data)
Resizes the given texture. May only be done on writeable textures. Potentially regenerates internal d...