texture.h
316 B 1#pragma once
2
3#include "globals.h"
4#include "util_math.h"
5#include "vector"
6
7struct Texture {
8 int width;
9 int height;
10 u32 *pixels; // sizeof(u32)[width * height]
11};
12
13extern std::vector<Texture> textures;
14
15Texture load_texture(const char *filename);
16u32 sample_texture(int texture_index, vec2f uv);