openMSX
SDLGLOffScreenSurface.cc
Go to the documentation of this file.
3#include "GLUtil.hh"
4
5namespace openmsx {
6
8 : fboTex(true) // enable interpolation TODO why?
9{
11 auto [w, h] = getPhysicalSize();
12 fboTex.bind();
13 glTexImage2D(GL_TEXTURE_2D, // target
14 0, // level
15 GL_RGB, // internal format
16 w, // width
17 h, // height
18 0, // border
19 GL_RGB, // format
20 GL_UNSIGNED_BYTE, // type
21 nullptr); // data
22 fbo = gl::FrameBufferObject(fboTex);
23 fbo.push();
24
26}
27
28void SDLGLOffScreenSurface::saveScreenshot(const std::string& filename)
29{
31}
32
33} // namespace openmsx
void bind()
Makes this texture the active GL texture.
Definition: GLUtil.hh:81
A frame buffer where pixels can be written to.
gl::ivec2 getPhysicalSize() const
gl::ivec2 getLogicalSize() const
void calculateViewPort(gl::ivec2 logSize, gl::ivec2 physSize)
Definition: OutputSurface.cc:6
SDLGLOffScreenSurface(const OutputSurface &output)
static void saveScreenshotGL(const OutputSurface &output, const std::string &filename)
This file implemented 3 utility functions:
Definition: Autofire.cc:9