blob: 20a022834fa976fb0831f140e24bdde34d352e02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef _SOFTSHADEROOM_TEXTURE_H_
#define _SOFTSHADEROOM_TEXTURE_H_
#include "vert.h"
typedef struct Texture{
uint width, height;
Color* pixels;
}Texture;
void texture_loadfromfile(const char* path, Texture* out);
typedef enum FilterMode {
FILTERMODE_POINT,
FILTERMODE_BILINEAR,
FILTERMODE_TRILINEAR,
} FilterMode;
typedef enum WrapMode{
WRAPMODE_REPEAT,
WRAPMODE_CLAMP,
} WrapMode;
Color32 texture_sampling(Texture* tex, FilterMode filter_mode, WrapMode wrap_mode, float x, float y);
#endif
|