8 , renderSettings(renderSettings_)
13 program[i].getUniformLocation(
"minScanline");
15 program[i].getUniformLocation(
"sizeVariance");
21 unsigned srcStartY,
unsigned srcEndY,
unsigned srcWidth,
22 unsigned dstStartY,
unsigned dstEndY,
unsigned dstWidth,
23 unsigned logSrcHeight)
25 setup(superImpose !=
nullptr);
26 int i = superImpose ? 1 : 0;
30 glUniform1f(unifMinScanline [i], 0.1f * gap + 0.2f * gap * gap);
31 glUniform1f(unifSizeVariance[i], 0.7f * gap - 0.3f * gap * gap);
33 srcStartY, srcEndY, srcWidth,
34 dstStartY, dstEndY, dstWidth,
Abstract base class for OpenGL scalers.
void setup(bool superImpose)
Setup scaler.
std::array< gl::ShaderProgram, 2 > program
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.
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.
GLTVScaler(RenderSettings &renderSettings)
Class containing all settings for renderers.
float getScanlineGap() const
The amount of space [0..1] between scanlines.
This file implemented 3 utility functions:
constexpr auto xrange(T e)