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. | |
Definition at line 19 of file GLImage.hh.
|
explicit |
Definition at line 75 of file GLImage.cc.
|
explicit |
Definition at line 131 of file GLImage.cc.
openmsx::GLImage::GLImage | ( | const std::string & | filename, |
float | scaleFactor | ||
) |
Definition at line 80 of file GLImage.cc.
References checkSize(), and gl::trunc().
openmsx::GLImage::GLImage | ( | const std::string & | filename, |
gl::ivec2 | size | ||
) |
Definition at line 87 of file GLImage.cc.
References checkSize().
openmsx::GLImage::GLImage | ( | gl::ivec2 | size, |
uint32_t | rgba | ||
) |
Definition at line 94 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 108 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 23 of file GLImage.cc.
Referenced by GLImage(), GLImage(), GLImage(), and GLImage().
|
inline |
void openmsx::GLImage::draw | ( | gl::ivec2 | pos, |
uint8_t | r, | ||
uint8_t | g, | ||
uint8_t | b, | ||
uint8_t | alpha | ||
) |
Definition at line 145 of file GLImage.cc.
References gl::Texture::bind(), gl::context, g, gl::Texture::get(), and gl::BufferObject::get().
|
inline |
Definition at line 36 of file GLImage.hh.