Classes | |
struct | VideoState |
Public Member Functions | |
bool | hasFeature (OSystem::Feature f) const override |
void | setFeatureState (OSystem::Feature f, bool enable) override |
bool | getFeatureState (OSystem::Feature f) const override |
const OSystem::GraphicsMode * | getSupportedGraphicsModes () const override |
int | getDefaultGraphicsMode () const override |
bool | setGraphicsMode (int mode, uint flags=OSystem::kGfxModeNoFlags) override |
int | getGraphicsMode () const override |
const OSystem::GraphicsMode * | getSupportedStretchModes () const override |
int | getDefaultStretchMode () const override |
bool | setStretchMode (int mode) override |
int | getStretchMode () const override |
bool | setShader (const Common::Path &fileNode) override |
void | beginGFXTransaction () override |
OSystem::TransactionError | endGFXTransaction () override |
int | getScreenChangeID () const override |
void | initSize (uint width, uint height, const Graphics::PixelFormat *format) override |
int16 | getWidth () const override |
int16 | getHeight () const override |
void | copyRectToScreen (const void *buf, int pitch, int x, int y, int w, int h) override |
void | fillScreen (uint32 col) override |
void | fillScreen (const Common::Rect &r, uint32 col) override |
void | updateScreen () override |
Graphics::Surface * | lockScreen () override |
void | unlockScreen () override |
void | setFocusRectangle (const Common::Rect &rect) override |
void | clearFocusRectangle () override |
int16 | getOverlayWidth () const override |
int16 | getOverlayHeight () const override |
Graphics::PixelFormat | getOverlayFormat () const override |
void | copyRectToOverlay (const void *buf, int pitch, int x, int y, int w, int h) override |
void | clearOverlay () override |
void | grabOverlay (Graphics::Surface &surface) const override |
void | setMouseCursor (const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format, const byte *mask) override |
void | setCursorPalette (const byte *colors, uint start, uint num) override |
void | displayMessageOnOSD (const Common::U32String &msg) override |
void | displayActivityIconOnOSD (const Graphics::Surface *icon) override |
void | setPalette (const byte *colors, uint start, uint num) override |
void | grabPalette (byte *colors, uint start, uint num) const override |
Public Member Functions inherited from WindowedGraphicsManager | |
void | showOverlay (bool inGUI) override |
void | hideOverlay () override |
bool | isOverlayVisible () const override |
void | setShakePos (int shakeXOffset, int shakeYOffset) override |
int | getWindowWidth () const |
int | getWindowHeight () const |
Public Member Functions inherited from GraphicsManager | |
virtual Common::RotationMode | getRotationMode () const |
virtual uint | getDefaultScaler () const |
virtual uint | getDefaultScaleFactor () const |
virtual bool | setScaler (uint mode, int factor) |
virtual uint | getScaler () const |
virtual uint | getScaleFactor () const |
virtual void | initSizeHint (const Graphics::ModeList &modes) |
virtual float | getHiDPIScreenFactor () const |
virtual void | saveScreenshot () |
virtual bool | lockMouse (bool lock) |
Public Member Functions inherited from PaletteManager | |
void | setPalette (const Graphics::Palette &pal, uint start=0) |
Graphics::Palette | grabPalette (uint start, uint num) |
Protected Types | |
enum | TransactionMode { kTransactionNone = 0, kTransactionActive = 1, kTransactionRollback = 2 } |
Protected Member Functions | |
void | renderCursor () |
bool | isGLESContext () const |
void | notifyContextCreate (ContextType type, Framebuffer *target, const Graphics::PixelFormat &defaultFormat, const Graphics::PixelFormat &defaultFormatAlpha) |
void | notifyContextDestroy () |
Surface * | createSurface (const Graphics::PixelFormat &format, bool wantAlpha=false, bool wantScaler=false, bool wantMask=false) |
TransactionMode | getTransactionMode () const |
virtual bool | loadVideoMode (uint requestedWidth, uint requestedHeight, const Graphics::PixelFormat &format)=0 |
bool | loadShader (const Common::Path &fileName) |
virtual void | refreshScreen ()=0 |
bool | saveScreenshot (const Common::Path &filename) const |
bool | getGLPixelFormat (const Graphics::PixelFormat &pixelFormat, GLenum &glIntFormat, GLenum &glFormat, GLenum &glType) const |
bool | gameNeedsAspectRatioCorrection () const override |
int | getGameRenderScale () const override |
void | recalculateDisplayAreas () override |
void | handleResizeImpl (const int width, const int height) override |
void | updateLinearFiltering () |
Pipeline * | getPipeline () const |
void | updateCursorPalette () |
void | recalculateCursorScaling () |
virtual const Graphics::Font * | getFontOSD () const |
Protected Member Functions inherited from WindowedGraphicsManager | |
Common::Point | convertVirtualToWindow (const int x, const int y) const |
Common::Point | convertWindowToVirtual (int x, int y) const |
frac_t | getDesiredGameAspectRatio () const |
void | handleResize (const int width, const int height) |
virtual void | setSystemMousePosition (const int x, const int y)=0 |
virtual void | notifyActiveAreaChanged () |
bool | showMouse (bool visible) override |
void | warpMouse (int x, int y) override |
void | setMousePosition (int x, int y) |
Protected Attributes | |
VideoState | _currentState |
VideoState | _oldState |
Graphics::PixelFormat | _defaultFormat |
Graphics::PixelFormat | _defaultFormatAlpha |
Framebuffer * | _targetBuffer |
Surface * | _gameScreen |
byte | _gamePalette [3 *256] |
Surface * | _overlay |
Surface * | _cursor |
Surface * | _cursorMask |
int | _cursorHotspotX |
int | _cursorHotspotY |
int | _cursorHotspotXScaled |
int | _cursorHotspotYScaled |
float | _cursorWidthScaled |
float | _cursorHeightScaled |
uint32 | _cursorKeyColor |
bool | _cursorUseKey |
bool | _cursorDontScale |
bool | _cursorPaletteEnabled |
byte | _cursorPalette [3 *256] |
Protected Attributes inherited from WindowedGraphicsManager | |
int | _windowWidth |
int | _windowHeight |
int | _screenAlign |
bool | _overlayVisible |
bool | _overlayInGUI |
int | _gameScreenShakeXOffset |
int | _gameScreenShakeYOffset |
Common::Rect | _gameDrawRect |
Common::Rect | _overlayDrawRect |
DisplayArea | _activeArea |
bool | _forceRedraw |
bool | _cursorVisible |
bool | _cursorNeedsRedraw |
bool | _cursorLastInActiveArea |
int | _cursorX |
int | _cursorY |
|
overridevirtual |
Replace the specified range of the palette with new colors. The palette entries from 'start' till (start+num-1) will be replaced - so a full palette update is accomplished via start=0, num=256.
The palette data is specified in interleaved RGB format. That is, the first byte of the memory block 'colors' points at is the red component of the first new color; the second byte the green component of the first new color; the third byte the blue component, the last byte to the alpha (transparency) value. Then the second color starts, and so on. So memory looks like this: R1-G1-B1-R2-G2-B2-R3-...
colors | the new palette data, in interleaved RGB format |
start | the first palette entry to be updated |
num | the number of palette entries to be updated |
Implements GraphicsManager.
|
overridevirtual |
Grabs a specified part of the currently active palette. The format is the same as for setPalette.
This should return exactly the same RGB data as was setup via previous setPalette calls.
For example, for every valid value of start and num of the following code:
byte origPal[num*3]; // Setup origPal's data however you like g_system->setPalette(origPal, start, num); byte obtainedPal[num*3]; g_system->grabPalette(obtainedPal, start, num);
the following should be true:
memcmp(origPal, obtainedPal, num*3) == 0
colors | the palette data, in interleaved RGB format |
start | the first platte entry to be read |
num | the number of palette entries to be read |
Implements GraphicsManager.
|
inlineprotected |
Whether a GLES or GLES2 context is active.
|
protected |
Notify the manager of a OpenGL context change. This should be the first thing to call after you created an OpenGL (ES) context!
type | Type of the OpenGL (ES) contexts created. |
defaultFormat | The new default format for the game screen (this is used for the CLUT8 game screens). |
defaultFormatAlpha | The new default format with an alpha channel (this is used for the overlay and cursor). |
|
protected |
Notify the manager that the OpenGL context is about to be destroyed. This will free up/reset internal OpenGL related state and must be called whenever a context might be created again after destroying a context.
|
protected |
Create a surface with the specified pixel format.
format | The pixel format the Surface object should accept as input. |
wantAlpha | For CLUT8 surfaces this marks whether an alpha channel should be used. |
wantScaler | Whether or not a software scaler should be used. |
|
protectedpure virtual |
Set up the requested video mode. This takes parameters which describe what resolution the game screen requests (this is possibly aspect ratio corrected!).
A sub-class should take these parameters as hints. It might very well set up a mode which it thinks suites the situation best.
requestedWidth This is the requested actual game screen width.
requestedHeight | This is the requested actual game screen height. |
format | This is the requested pixel format of the virtual game screen. |
Implemented in AndroidGraphicsManager, iOSGraphicsManager, OpenGLSdlGraphicsManager, and LibretroOpenGLGraphics.
|
protectedpure virtual |
Refresh the screen contents.
Implemented in AndroidGraphicsManager, iOSGraphicsManager, OpenGLSdlGraphicsManager, and LibretroOpenGLGraphics.
|
protected |
Saves a screenshot of the entire window, excluding window decorations.
filename | The output filename. |
|
protected |
Try to determine the internal parameters for a given pixel format.
|
overrideprotectedvirtual |
Implements WindowedGraphicsManager.
Reimplemented in LibretroOpenGLGraphics.
|
overrideprotectedvirtual |
Reimplemented from WindowedGraphicsManager.
|
overrideprotectedvirtual |
Recalculates the display areas for the game and overlay surfaces within the window.
Reimplemented from WindowedGraphicsManager.
|
overrideprotectedvirtual |
Backend-specific implementation for updating internal surfaces that need to reflect the new window size.
Implements WindowedGraphicsManager.
Reimplemented in OpenGLSdlGraphicsManager, and LibretroOpenGLGraphics.
|
protected |
Set up the correct cursor palette.
|
protected |
Recalculate the cursor scaling. Scaling is always done according to the game screen.
|
protectedvirtual |
Returns the font used for on screen display
|
protected |
The currently set up video state.
|
protected |
The old video state used when doing a transaction rollback.
|
protected |
The default pixel format of the backend.
|
protected |
The default pixel format with an alpha channel.
|
protected |
Render target.
|
protected |
The rendering surface for the virtual game screen.
|
protected |
The game palette if in CLUT8 mode.
|
protected |
The rendering surface for the overlay.
|
protected |
The rendering surface for the mouse cursor.
|
protected |
The rendering surface for the opacity and inversion mask (if any)
|
protected |
The X offset for the cursor hotspot in unscaled game coordinates.
|
protected |
The Y offset for the cursor hotspot in unscaled game coordinates.
|
protected |
The X offset for the cursor hotspot in scaled game display area coordinates.
|
protected |
The Y offset for the cursor hotspot in scaled game display area coordinates.
|
protected |
The width of the cursor in scaled game display area coordinates.
|
protected |
The height of the cursor in scaled game display area coordinates.
|
protected |
The key color.
|
protected |
If true, use key color.
|
protected |
Whether no cursor scaling should be applied.
|
protected |
Whether the special cursor palette is enabled.
|
protected |
The special cursor palette in case enabled.