blob: 9e0d884d39899703e433d0e55ca14856413bf464 (
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 enum {
FILTERMODE_POINT,
FILTERMODE_BILINEAR,
/*FILTERMODE_TRILINEAR,*/
} FilterMode;
typedef enum {
WRAPMODE_REPEAT,
WRAPMODE_CLAMP,
} WrapMode;
typedef struct {
uint width, height;
Color32* pixels;
} Texture;
Texture* texture_loadfromfile(const char* path);
Color32 texture_sampling(Texture* tex, FilterMode filter_mode, WrapMode wrap_mode, float x, float y);
#endif
|