texture.h
C++ software renderersrc/texture.h
316 B#pragma once
#include "globals.h"
#include "util_math.h"
#include "vector"
struct Texture {
int width;
int height;
u32 *pixels; // sizeof(u32)[width * height]
};
extern std::vector<Texture> textures;
Texture load_texture(const char *filename);
u32 sample_texture(int texture_index, vec2f uv);