21 explicit GLImage(
const std::string& filename);
23 GLImage(
const std::string& filename,
float scaleFactor);
27 int borderSize, uint32_t borderRGBA);
30 draw(pos, 255, 255, 255, alpha);
33 uint8_t r, uint8_t
g, uint8_t b, uint8_t alpha);
49 std::array<gl::BufferObject, 3> vbo;
53 std::array<uint16_t, 4> bgA;
55 std::array<uint8_t, 4> bgR, bgG, bgB;
56 uint8_t borderR{0}, borderG{0}, borderB{0};
Wrapper around a SDL_Surface.
Most basic/generic texture: only contains a texture ID.
gl::ivec2 getSize() const
static void checkSize(gl::ivec2 size)
Performs a sanity check on image size.
void draw(gl::ivec2 pos, uint8_t alpha=255)
GLImage(const std::string &filename)
This file implemented 3 utility functions:
gl::Texture loadTexture(const std::string &filename, ivec2 &size)
size_t size(std::string_view utf8)