openMSX
GLScaleNxScaler.cc
Go to the documentation of this file.
1#include "GLScaleNxScaler.hh"
2
3namespace openmsx {
4
6 : GLScaler("scale2x")
7 , fallback(fallback_)
8{
9}
10
12 gl::ColorTexture& src, gl::ColorTexture* superImpose,
13 unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
14 unsigned dstStartY, unsigned dstEndY, unsigned dstWidth,
15 unsigned logSrcHeight)
16{
17 if (srcWidth == 320) {
18 setup(superImpose != nullptr);
19 execute(src, superImpose,
20 srcStartY, srcEndY, srcWidth,
21 dstStartY, dstEndY, dstWidth,
22 logSrcHeight);
23 } else {
24 fallback.scaleImage(src, superImpose,
25 srcStartY, srcEndY, srcWidth,
26 dstStartY, dstEndY, dstWidth,
27 logSrcHeight);
28 }
29}
30
31} // namespace openmsx
GLScaleNxScaler(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.
Abstract base class for OpenGL scalers.
Definition GLScaler.hh:16
void setup(bool superImpose)
Setup scaler.
Definition GLScaler.cc:40
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.
Definition GLScaler.cc:48
virtual void scaleImage(gl::ColorTexture &src, gl::ColorTexture *superImpose, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, unsigned dstStartY, unsigned dstEndY, unsigned dstWidth, unsigned logSrcHeight)=0
Scales the image in the given area, which must consist of lines which are all equally wide.
This file implemented 3 utility functions:
Definition Autofire.cc:11