openMSX
GLScaleNxScaler.cc
Go to the documentation of this file.
1 #include "GLScaleNxScaler.hh"
2 
3 namespace 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
openmsx::GLScaler::scaleImage
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.
openmsx::GLScaleNxScaler::GLScaleNxScaler
GLScaleNxScaler(GLScaler &fallback)
Definition: GLScaleNxScaler.cc:5
gl::ColorTexture
Definition: GLUtil.hh:94
openmsx::GLScaler::execute
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:45
openmsx::GLScaler::setup
void setup(bool superImpose)
Definition: GLScaler.cc:39
openmsx::GLScaleNxScaler::scaleImage
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.
Definition: GLScaleNxScaler.cc:11
openmsx::GLScaler
Abstract base class for OpenGL scalers.
Definition: GLScaler.hh:13
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
GLScaleNxScaler.hh