| e8555c89 Andy McCall |
1 |
#ifndef GLHQSCALER_HH |
| 2 |
#define GLHQSCALER_HH |
| 3 |
|
| 4 |
#include "GLScaler.hh" |
| 5 |
|
| 6 |
#include <array> |
| 7 |
#include <cstdint> |
| 8 |
|
| 9 |
namespace openmsx { |
| 10 |
|
| 11 |
class GLHQScaler final : public GLScaler |
| 12 |
{ |
| 13 |
public: |
| 14 |
explicit GLHQScaler(GLScaler& fallback, unsigned maxWidth, unsigned maxHeight); |
| 15 |
|
| 16 |
void scaleImage( |
| 17 |
gl::ColorTexture& src, gl::ColorTexture* superImpose, |
| 18 |
unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, |
| 19 |
unsigned dstStartY, unsigned dstEndY, unsigned dstWidth, |
| 20 |
unsigned logSrcHeight) override; |
| 21 |
void uploadBlock( |
| 22 |
unsigned srcStartY, unsigned srcEndY, |
| 23 |
unsigned lineWidth, FrameSource& paintFrame) override; |
| 24 |
|
| 25 |
private: |
| 26 |
GLScaler& fallback; |
| 27 |
gl::Texture edgeTexture; |
| 28 |
std::array<gl::Texture, 3> offsetTexture; |
| 29 |
std::array<gl::Texture, 3> weightTexture; |
| 30 |
gl::PixelBuffer<uint16_t> edgeBuffer; |
| 31 |
|
| 32 |
unsigned maxWidth; |
| 33 |
unsigned maxHeight; |
| 34 |
std::array<int, 2> edgePosScaleUnif; |
| 35 |
}; |
| 36 |
|
| 37 |
} |
| 38 |
|
| 39 |
#endif |