openMSX
Public Member Functions | List of all members
openmsx::GLHQScaler Class Referencefinal

#include <GLHQScaler.hh>

Inheritance diagram for openmsx::GLHQScaler:
Inheritance graph
[legend]
Collaboration diagram for openmsx::GLHQScaler:
Collaboration graph
[legend]

Public Member Functions

 GLHQScaler (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 (gl::ColorTexture &src, 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
 

Detailed Description

Definition at line 10 of file GLHQScaler.hh.

Constructor & Destructor Documentation

◆ GLHQScaler()

openmsx::GLHQScaler::GLHQScaler ( GLScaler fallback)
explicit

Member Function Documentation

◆ scaleImage()

void openmsx::GLHQScaler::scaleImage ( gl::ColorTexture src,
gl::ColorTexture superImpose,
unsigned  srcStartY,
unsigned  srcEndY,
unsigned  srcWidth,
unsigned  dstStartY,
unsigned  dstEndY,
unsigned  dstWidth,
unsigned  logSrcHeight 
)
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.

Parameters
srcSource: texture containing the frame to be scaled.
superImposeTexture containing the to-be-superimposed image (can be nullptr).
srcStartYY-coordinate of the top source line (inclusive).
srcEndYY-coordinate of the bottom source line (exclusive).
srcWidthThe number of pixels per line for the given area.
dstStartYY-coordinate of the top destination line (inclusive).
dstEndYY-coordinate of the bottom destination line (exclusive).
dstWidthThe number of pixels per line on the output screen.
logSrcHeightThe 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 80 of file GLHQScaler.cc.

References gl::Texture::bind(), openmsx::GLScaler::execute(), gl::ColorTexture::getHeight(), openmsx::GLScaler::scaleImage(), and openmsx::GLScaler::setup().

◆ uploadBlock()

void openmsx::GLHQScaler::uploadBlock ( unsigned  srcStartY,
unsigned  srcEndY,
unsigned  lineWidth,
FrameSource paintFrame 
)
overridevirtual

The documentation for this class was generated from the following files: