openMSX
|
#include <GLHQLiteScaler.hh>
Public Member Functions | |
GLHQLiteScaler (GLScaler &fallback) | |
void | scaleImage (gl::ColorTexture &src, gl::ColorTexture *superImpose, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, unsigned dstStartY, unsigned dstEndY, unsigned dstWidth, unsigned logSrcHeight) override |
Scales the image in the given area, which must consist of lines which are all equally wide. | |
void | uploadBlock (unsigned srcStartY, unsigned srcEndY, unsigned lineWidth, FrameSource &paintFrame) override |
Public Member Functions inherited from openmsx::GLScaler | |
virtual | ~GLScaler ()=default |
void | setup (bool superImpose) |
Setup scaler. | |
Additional Inherited Members | |
Protected Member Functions inherited from openmsx::GLScaler | |
GLScaler (const std::string &progName) | |
void | execute (const gl::ColorTexture &src, const gl::ColorTexture *superImpose, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, unsigned dstStartY, unsigned dstEndY, unsigned dstWidth, unsigned logSrcHeight, bool textureFromZero=false) |
Helper method to draw a rectangle with multiple texture coordinates. | |
Protected Attributes inherited from openmsx::GLScaler | |
std::array< gl::BufferObject, 2 > | vbo |
std::array< gl::ShaderProgram, 2 > | program |
std::array< GLint, 2 > | unifTexSize |
std::array< GLint, 2 > | unifMvpMatrix |
Definition at line 12 of file GLHQLiteScaler.hh.
|
explicit |
Definition at line 19 of file GLHQLiteScaler.cc.
References gl::Texture::bind(), openmsx::DiskImageUtils::format(), openmsx::File::mmap(), OPENGL_3_3, OPENGL_VERSION, openmsx::GLScaler::program, gl::PixelBuffer< T >::setImage(), openmsx::systemFileContext(), and xrange().
|
overridevirtual |
Scales the image in the given area, which must consist of lines which are all equally wide.
Scaling factor depends on the concrete scaler.
src | Source: texture containing the frame to be scaled. |
superImpose | Texture containing the to-be-superimposed image (can be nullptr). |
srcStartY | Y-coordinate of the top source line (inclusive). |
srcEndY | Y-coordinate of the bottom source line (exclusive). |
srcWidth | The number of pixels per line for the given area. |
dstStartY | Y-coordinate of the top destination line (inclusive). |
dstEndY | Y-coordinate of the bottom destination line (exclusive). |
dstWidth | The number of pixels per line on the output screen. |
logSrcHeight | The logical height of the complete src texture (actual texture height can be double as high in case of non-interlace). This is needed to translate src-Y-coordinates to superImpose-Y-coordinates. |
Implements openmsx::GLScaler.
Definition at line 72 of file GLHQLiteScaler.cc.
References gl::Texture::bind(), openmsx::GLScaler::execute(), openmsx::GLScaler::scaleImage(), gl::Texture::setInterpolation(), and openmsx::GLScaler::setup().
|
overridevirtual |
Reimplemented from openmsx::GLScaler.
Definition at line 103 of file GLHQLiteScaler.cc.
References gl::Texture::bind(), gl::PixelBuffer< T >::bind(), openmsx::calcEdgesGL(), ranges::fill(), openmsx::DiskImageUtils::format(), openmsx::FrameSource::getLine(), gl::PixelBuffer< T >::getOffset(), gl::PixelBuffer< T >::mapWrite(), OPENGL_3_3, OPENGL_VERSION, gl::PixelBuffer< T >::unbind(), gl::PixelBuffer< T >::unmap(), VLA_SSE_ALIGNED, and xrange().