openMSX
SDLGLOffScreenSurface.cc
Go to the documentation of this file.
2 #include "SDLGLVisibleSurface.hh"
3 #include "GLUtil.hh"
4 
5 namespace 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 
28 void SDLGLOffScreenSurface::saveScreenshot(const std::string& filename)
29 {
31 }
32 
33 } // namespace openmsx
openmsx::SDLGLVisibleSurface::saveScreenshotGL
static void saveScreenshotGL(const OutputSurface &output, const std::string &filename)
Definition: SDLGLVisibleSurface.cc:118
openmsx::OutputSurface::calculateViewPort
void calculateViewPort(gl::ivec2 logSize, gl::ivec2 physSize)
Definition: OutputSurface.cc:6
SDLGLOffScreenSurface.hh
gl::FrameBufferObject::push
void push()
Definition: GLUtil.cc:116
gl::Texture::bind
void bind()
Makes this texture the active GL texture.
Definition: GLUtil.hh:82
openmsx::OutputSurface::setOpenGlPixelFormat
void setOpenGlPixelFormat()
Definition: OutputSurface.cc:24
gl::FrameBufferObject
Definition: GLUtil.hh:120
SDLGLVisibleSurface.hh
openmsx::filename
constexpr const char *const filename
Definition: FirmwareSwitch.cc:10
openmsx::OutputSurface::getPhysicalSize
gl::ivec2 getPhysicalSize() const
Definition: OutputSurface.hh:30
openmsx::SDLGLOffScreenSurface::SDLGLOffScreenSurface
SDLGLOffScreenSurface(const OutputSurface &output)
Definition: SDLGLOffScreenSurface.cc:7
openmsx::OutputSurface
A frame buffer where pixels can be written to.
Definition: OutputSurface.hh:20
GLUtil.hh
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::OutputSurface::getLogicalSize
gl::ivec2 getLogicalSize() const
Definition: OutputSurface.hh:29