openMSX
|
#include <GLImage.hh>
Public Member Functions | |
GLImage (const std::string &filename) | |
GLImage (SDLSurfacePtr image) | |
GLImage (const std::string &filename, float scaleFactor) | |
GLImage (const std::string &filename, gl::ivec2 size) | |
GLImage (gl::ivec2 size, uint32_t rgba) | |
GLImage (gl::ivec2 size, std::span< const uint32_t, 4 > rgba, int borderSize, uint32_t borderRGBA) | |
void | draw (gl::ivec2 pos, uint8_t alpha=255) |
void | draw (gl::ivec2 pos, uint8_t r, uint8_t g, uint8_t b, uint8_t alpha) |
gl::ivec2 | getSize () const |
Static Public Member Functions | |
static void | checkSize (gl::ivec2 size) |
Performs a sanity check on image size. More... | |
Definition at line 18 of file GLImage.hh.
|
explicit |
Definition at line 70 of file GLImage.cc.
|
explicit |
Definition at line 126 of file GLImage.cc.
openmsx::GLImage::GLImage | ( | const std::string & | filename, |
float | scaleFactor | ||
) |
Definition at line 75 of file GLImage.cc.
References checkSize(), and gl::trunc().
openmsx::GLImage::GLImage | ( | const std::string & | filename, |
gl::ivec2 | size | ||
) |
Definition at line 82 of file GLImage.cc.
References checkSize().
openmsx::GLImage::GLImage | ( | gl::ivec2 | size, |
uint32_t | rgba | ||
) |
Definition at line 89 of file GLImage.cc.
References checkSize(), and xrange().
openmsx::GLImage::GLImage | ( | gl::ivec2 | size, |
std::span< const uint32_t, 4 > | rgba, | ||
int | borderSize, | ||
uint32_t | borderRGBA | ||
) |
Definition at line 103 of file GLImage.cc.
References checkSize(), and xrange().
|
static |
Performs a sanity check on image size.
Throws MSXException if width or height is excessively large. Negative image sizes are valid and flip the image.
Definition at line 18 of file GLImage.cc.
Referenced by GLImage().
|
inline |
void openmsx::GLImage::draw | ( | gl::ivec2 | pos, |
uint8_t | r, | ||
uint8_t | g, | ||
uint8_t | b, | ||
uint8_t | alpha | ||
) |
Definition at line 140 of file GLImage.cc.
References gl::Texture::bind(), gl::context, g, gl::Texture::get(), and gl::BufferObject::get().
|
inline |
Definition at line 35 of file GLImage.hh.