ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

OpenGLSdlGraphicsManager Class Reference

SDL OpenGL based graphics manager. More...

#include <openglsdl-graphics.h>

Inheritance diagram for OpenGLSdlGraphicsManager:
Collaboration diagram for OpenGLSdlGraphicsManager:

List of all members.

Classes

struct  OpenGLPixelFormat

Public Member Functions

 OpenGLSdlGraphicsManager (SdlEventSource *sdlEventSource, SdlWindow *window, const Capabilities &capabilities)
virtual ~OpenGLSdlGraphicsManager ()
virtual bool hasFeature (OSystem::Feature f) const override
virtual bool getFeatureState (OSystem::Feature f) const override
virtual void setFeatureState (OSystem::Feature f, bool enable) override
virtual void setupScreen (uint gameWidth, uint gameHeight, bool fullscreen, bool accel3d) override
virtual Graphics::PixelBuffer getScreenPixelBuffer () override
virtual int16 getHeight () const override
virtual int16 getWidth () const override
virtual void updateScreen ()
virtual void showOverlay () override
virtual void hideOverlay () override
virtual void clearOverlay () override
virtual void grabOverlay (void *buf, int pitch) const override
virtual void copyRectToOverlay (const void *buf, int pitch, int x, int y, int w, int h) override
int16 getOverlayWidth () const override
int16 getOverlayHeight () const override
virtual void suggestSideTextures (Graphics::Surface *left, Graphics::Surface *right) override
virtual void warpMouse (int x, int y) override
virtual void transformMouseCoordinates (Common::Point &point) override
void notifyResize (const uint width, const uint height) override

Protected Member Functions

bool createOrUpdateGLContext (uint gameWidth, uint gameHeight, uint effectiveWidth, uint effectiveHeight, bool renderToFramebuffer, bool engineSupportsArbitraryResolutions)
 Initialize an OpenGL window matching as closely as possible the required properties.
void createOrUpdateScreen ()
Math::Rect2d computeGameRect (bool renderToFrameBuffer, uint gameWidth, uint gameHeight, uint screenWidth, uint screenHeight)
 Compute the size and position of the game rectangle in the screen.
bool saveScreenshot (const Common::String &file) const override
 Save a screenshot to the specified file.
void initializeOpenGLContext () const
void drawOverlay ()
void drawSideTextures ()
void closeOverlay ()
OpenGL::FrameBuffercreateFramebuffer (uint width, uint height)
bool shouldRenderToFramebuffer () const
bool isVSyncEnabled () const

Protected Attributes

Math::Rect2d _gameRect
int _antialiasing
bool _vsync
OpenGL::TiledSurface_overlayScreen
OpenGL::TiledSurface_overlayBackground
OpenGL::Texture_sideTextures [2]
OpenGL::SurfaceRenderer_surfaceRenderer
OpenGL::FrameBuffer_frameBuffer

Detailed Description

SDL OpenGL based graphics manager.

Used when rendering games with OpenGL

Definition at line 40 of file openglsdl-graphics.h.


Constructor & Destructor Documentation

OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager ( SdlEventSource sdlEventSource,
SdlWindow window,
const Capabilities capabilities 
)

Definition at line 47 of file openglsdl-graphics.cpp.

OpenGLSdlGraphicsManager::~OpenGLSdlGraphicsManager (  )  [virtual]

Definition at line 66 of file openglsdl-graphics.cpp.


Member Function Documentation

void OpenGLSdlGraphicsManager::clearOverlay (  )  [override, virtual]

Definition at line 616 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::closeOverlay (  )  [protected]

Definition at line 633 of file openglsdl-graphics.cpp.

Math::Rect2d OpenGLSdlGraphicsManager::computeGameRect ( bool  renderToFrameBuffer,
uint  gameWidth,
uint  gameHeight,
uint  screenWidth,
uint  screenHeight 
) [protected]

Compute the size and position of the game rectangle in the screen.

Definition at line 246 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::copyRectToOverlay ( const void *  buf,
int  pitch,
int  x,
int  y,
int  w,
int  h 
) [override, virtual]

Definition at line 612 of file openglsdl-graphics.cpp.

OpenGL::FrameBuffer * OpenGLSdlGraphicsManager::createFramebuffer ( uint  width,
uint  height 
) [protected]

Definition at line 504 of file openglsdl-graphics.cpp.

bool OpenGLSdlGraphicsManager::createOrUpdateGLContext ( uint  gameWidth,
uint  gameHeight,
uint  effectiveWidth,
uint  effectiveHeight,
bool  renderToFramebuffer,
bool  engineSupportsArbitraryResolutions 
) [protected]

Initialize an OpenGL window matching as closely as possible the required properties.

When unable to create a context with anti-aliasing this tries without. When unable to create a context with the desired pixel depth this tries lower values.

Definition at line 329 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::createOrUpdateScreen (  )  [protected]

Definition at line 178 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::drawOverlay (  )  [protected]

Definition at line 465 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::drawSideTextures (  )  [protected]

Definition at line 482 of file openglsdl-graphics.cpp.

bool OpenGLSdlGraphicsManager::getFeatureState ( OSystem::Feature  f  )  const [override, virtual]

Reimplemented from ResVmSdlGraphicsManager.

Definition at line 85 of file openglsdl-graphics.cpp.

int16 OpenGLSdlGraphicsManager::getHeight (  )  const [override, virtual]

Definition at line 548 of file openglsdl-graphics.cpp.

int16 OpenGLSdlGraphicsManager::getOverlayHeight (  )  const [override]

Definition at line 652 of file openglsdl-graphics.cpp.

int16 OpenGLSdlGraphicsManager::getOverlayWidth (  )  const [override]

Definition at line 656 of file openglsdl-graphics.cpp.

Graphics::PixelBuffer OpenGLSdlGraphicsManager::getScreenPixelBuffer (  )  [override, virtual]

Definition at line 297 of file openglsdl-graphics.cpp.

int16 OpenGLSdlGraphicsManager::getWidth (  )  const [override, virtual]

Definition at line 556 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::grabOverlay ( void *  buf,
int  pitch 
) const [override, virtual]

Definition at line 620 of file openglsdl-graphics.cpp.

bool OpenGLSdlGraphicsManager::hasFeature ( OSystem::Feature  f  )  const [override, virtual]

Definition at line 73 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::hideOverlay (  )  [override, virtual]

Definition at line 602 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::initializeOpenGLContext (  )  const [protected]

Definition at line 301 of file openglsdl-graphics.cpp.

bool OpenGLSdlGraphicsManager::isVSyncEnabled (  )  const [protected]

Definition at line 455 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::notifyResize ( const uint  width,
const uint  height 
) [override]

Definition at line 267 of file openglsdl-graphics.cpp.

bool OpenGLSdlGraphicsManager::saveScreenshot ( const Common::String file  )  const [override, protected, virtual]

Save a screenshot to the specified file.

Implements ResVmSdlGraphicsManager.

Definition at line 697 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::setFeatureState ( OSystem::Feature  f,
bool  enable 
) [override, virtual]

Reimplemented from ResVmSdlGraphicsManager.

Definition at line 94 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::setupScreen ( uint  gameWidth,
uint  gameHeight,
bool  fullscreen,
bool  accel3d 
) [override, virtual]

Definition at line 108 of file openglsdl-graphics.cpp.

bool OpenGLSdlGraphicsManager::shouldRenderToFramebuffer (  )  const [protected]

Definition at line 450 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::showOverlay (  )  [override, virtual]

Definition at line 581 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::suggestSideTextures ( Graphics::Surface left,
Graphics::Surface right 
) [override, virtual]

Definition at line 568 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::transformMouseCoordinates ( Common::Point point  )  [override, virtual]

Definition at line 674 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::updateScreen (  )  [virtual]

Definition at line 516 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::warpMouse ( int  x,
int  y 
) [override, virtual]

Definition at line 660 of file openglsdl-graphics.cpp.


Member Data Documentation

Definition at line 119 of file openglsdl-graphics.h.

Definition at line 120 of file openglsdl-graphics.h.


The documentation for this class was generated from the following files:


Generated on Sat Sep 14 2019 05:03:15 for ResidualVM by doxygen 1.7.1
curved edge   curved edge