+ImageInput::ImageInput()
+ : sRGBSwitchingFlatInput({movit::COLORSPACE_sRGB, movit::GAMMA_sRGB}, movit::FORMAT_RGBA_POSTMULTIPLIED_ALPHA,
+ GL_UNSIGNED_BYTE, 1280, 720) // Resolution will be overwritten.
+{}
+
ImageInput::ImageInput(const string &filename)
: sRGBSwitchingFlatInput({movit::COLORSPACE_sRGB, movit::GAMMA_sRGB}, movit::FORMAT_RGBA_POSTMULTIPLIED_ALPHA,
GL_UNSIGNED_BYTE, 1280, 720), // Resolution will be overwritten.
ImageInput::ImageInput(const string &filename)
: sRGBSwitchingFlatInput({movit::COLORSPACE_sRGB, movit::GAMMA_sRGB}, movit::FORMAT_RGBA_POSTMULTIPLIED_ALPHA,
GL_UNSIGNED_BYTE, 1280, 720), // Resolution will be overwritten.
// is mostly there to save startup time, not RAM).
{
lock_guard<mutex> lock(all_images_lock);
// is mostly there to save startup time, not RAM).
{
lock_guard<mutex> lock(all_images_lock);
if (all_images[pathname] != current_image) {
current_image = all_images[pathname];
set_texture_num(*current_image->tex);
if (all_images[pathname] != current_image) {
current_image = all_images[pathname];
set_texture_num(*current_image->tex);
void ImageInput::start_update_thread(QSurface *surface)
{
update_thread = thread(update_thread_func, surface);
void ImageInput::start_update_thread(QSurface *surface)
{
update_thread = thread(update_thread_func, surface);