43 lines
1.1 KiB
C
43 lines
1.1 KiB
C
#ifndef TEXTURE_H
|
|
#define TEXTURE_H
|
|
|
|
#include "renderer.h"
|
|
#include "util.h"
|
|
|
|
struct asset;
|
|
struct work_startup_receipt;
|
|
struct renderer_startup_receipt;
|
|
struct asset_cache_startup_receipt;
|
|
struct resource_startup_receipt;
|
|
|
|
struct texture_frame {
|
|
struct clip_rect clip;
|
|
u32 duration_ms;
|
|
};
|
|
|
|
struct texture_slice {
|
|
struct clip_rect clip;
|
|
};
|
|
|
|
struct texture_anim {
|
|
u32 frame_start;
|
|
u32 frame_end;
|
|
};
|
|
|
|
struct texture {
|
|
struct renderer_handle renderer_handle;
|
|
struct v2 size;
|
|
};
|
|
|
|
struct texture_startup_receipt { i32 _; };
|
|
struct texture_startup_receipt texture_startup(struct work_startup_receipt *work_sr,
|
|
struct renderer_startup_receipt *renderer_sr,
|
|
struct asset_cache_startup_receipt *asset_cache_sr,
|
|
struct resource_startup_receipt *resource_sr);
|
|
|
|
struct asset *texture_load_asset(struct string path, b32 wait);
|
|
struct texture *texture_load_async(struct string path);
|
|
struct texture *texture_load(struct string path);
|
|
|
|
#endif
|