1#ifndef OUTPUTSURFACE_HH
2#define OUTPUTSURFACE_HH
A frame buffer where pixels can be written to.
uint32_t mapRGB255(gl::ivec3 rgb) const
Same as mapRGB, but RGB components are in range [0..255].
gl::ivec2 getPhysicalSize() const
OutputSurface(OutputSurface &&)=delete
int getLogicalWidth() const
gl::vec2 getViewScale() const
gl::ivec2 getLogicalSize() const
gl::ivec2 getViewOffset() const
OutputSurface(const OutputSurface &)=delete
void calculateViewPort(gl::ivec2 logSize, gl::ivec2 physSize)
OutputSurface & operator=(OutputSurface &&)=delete
virtual ~OutputSurface()=default
gl::ivec2 getViewSize() const
int getLogicalHeight() const
Pixel getKeyColor() const
Returns the color key for this output surface.
virtual void saveScreenshot(const std::string &filename)=0
Save the content of this OutputSurface to a PNG file.
uint32_t mapRGB(gl::vec3 rgb) const
Returns the pixel value for the given RGB color.
OutputSurface & operator=(const OutputSurface &)=delete
Pixel combine(unsigned r, unsigned g, unsigned b) const
Combine RGB components to a pixel.
This file implemented 3 utility functions: