ManaPlus
|
#include <graphics.h>
Public Types | |
enum | Alignment { LEFT = 0 , CENTER , RIGHT } |
Public Member Functions | |
virtual | ~Graphics () |
void | setWindow (SDL_Surface *const window, const int width, const int height) |
SDL_Surface * | getWindow () const |
void | setSync (const bool sync) |
bool | getSync () const |
virtual bool | setVideoMode (const int w, const int h, const int scale, const int bpp, const bool fs, const bool hwaccel, const bool resize, const bool noFrame, const bool allowHighDPI)=0 |
bool | setFullscreen (const bool fs) |
virtual bool | resizeScreen (const int width, const int height) |
virtual void | restoreContext () |
virtual void | drawRescaledImage (const Image *const image, int dstX, int dstY, const int desiredWidth, const int desiredHeight)=0 |
virtual void | drawPattern (const Image *const image, const int x, const int y, const int w, const int h)=0 |
virtual void | drawRescaledPattern (const Image *const image, const int x, const int y, const int w, const int h, const int scaledWidth, const int scaledHeight)=0 |
virtual void | drawImageRect (const int x, const int y, const int w, const int h, const ImageRect &imgRect)=0 |
virtual void | calcPattern (ImageVertexes *const vert, const Image *const image, const int x, const int y, const int w, const int h) const =0 |
virtual void | calcPattern (ImageCollection *const vert, const Image *const image, const int x, const int y, const int w, const int h) const =0 |
virtual void | calcTileVertexes (ImageVertexes *const vert, const Image *const image, int x, int y) const =0 |
virtual void | calcTileSDL (ImageVertexes *const vert, int x, int y) const |
virtual void | drawTileVertexes (const ImageVertexes *const vert)=0 |
virtual void | drawTileCollection (const ImageCollection *const vertCol)=0 |
virtual void | calcTileCollection (ImageCollection *const vertCol, const Image *const image, int x, int y)=0 |
virtual void | calcWindow (ImageCollection *const vertCol, const int x, const int y, const int w, const int h, const ImageRect &imgRect)=0 |
virtual void | fillRectangle (const Rect &rectangle)=0 |
virtual void | updateScreen ()=0 |
void | setWindowSize (const int width, const int height) |
int | getWidth () const |
int | getHeight () const |
int | getMemoryUsage () const |
virtual void | drawNet (const int x1, const int y1, const int x2, const int y2, const int width, const int height) |
ClipRect & | getTopClip () const |
void | setRedraw (const bool n) |
bool | getRedraw () const |
void | setSecure (const bool n) |
bool | getSecure () const |
int | getBpp () const |
bool | getFullScreen () const |
bool | getHWAccel () const |
bool | getDoubleBuffer () const |
RenderType | getOpenGL () const |
void | setNoFrame (const bool n) |
const std::string & | getName () const |
virtual void | initArrays (const int vertCount) |
virtual void | setColor (const Color &color) |
const Color & | getColor () const |
virtual void | drawImage (const Image *const image, int dstX, int dstY)=0 |
virtual void | copyImage (const Image *const image, int dstX, int dstY)=0 |
virtual void | drawImageCached (const Image *const image, int srcX, int srcY)=0 |
virtual void | drawPatternCached (const Image *const image, const int x, const int y, const int w, const int h)=0 |
virtual void | completeCache ()=0 |
int | getScale () const |
virtual bool | isAllowScale () const |
void | setScale (int scale) |
virtual void | pushClipArea (const Rect &area) |
virtual void | popClipArea () |
virtual void | drawLine (int x1, int y1, int x2, int y2)=0 |
virtual void | drawRectangle (const Rect &rectangle)=0 |
virtual void | createGLContext (const bool custom) |
virtual void | drawPoint (int x, int y)=0 |
virtual void | beginDraw () |
virtual void | endDraw () |
virtual void | clearScreen () const |
virtual void | deleteArrays () |
virtual void | postInit () |
virtual void | finalize (ImageCollection *const col) |
virtual void | finalize (ImageVertexes *const vert) |
virtual void | testDraw () |
virtual void | removeArray (const uint32_t sz, uint32_t *const arr) |
virtual void | screenResized () |
Static Public Member Functions | |
static void | cleanUp () |
Data Fields | |
int | mWidth |
int | mHeight |
int | mActualWidth |
int | mActualHeight |
Protected Member Functions | |
Graphics () | |
void | setMainFlags (const int w, const int h, const int scale, const int bpp, const bool fs, const bool hwaccel, const bool resize, const bool noFrame, const bool allowHighDPI) |
int | getOpenGLFlags () const |
int | getSoftwareFlags () const |
bool | setOpenGLMode () |
void | updateMemoryInfo () |
bool | videoInfo () |
void | setOpenGLFlags () |
Protected Attributes | |
MStack< ClipRect > | mClipStack |
SDL_Surface * | mWindow |
int | mBpp |
bool | mAlpha |
bool | mFullscreen |
bool | mHWAccel |
bool | mRedraw |
bool | mDoubleBuffer |
SDL_Rect | mRect |
bool | mSecure |
RenderType | mOpenGL |
bool | mEnableResize |
bool | mNoFrame |
bool | mAllowHighDPI |
std::string | mName |
int | mStartFreeMem |
bool | mSync |
int | mScale |
Color | mColor |
Static Protected Attributes | |
static void * | mGLContext = 0 |
Friends | |
class | OpenGLScreenshotHelper |
class | SdlScreenshotHelper |
A central point of control for graphics.
Definition at line 108 of file graphics.h.
enum Graphics::Alignment |
|
virtual |
|
protected |
|
inlinevirtual |
Initializes drawing. Called by the Gui when Gui::draw() is called. It is needed by some implementations of Graphics to perform preparations before drawing. An example of such an implementation is the OpenGLGraphics.
NOTE: You will never need to call this function yourself, unless you use a Graphics object outside of Guichan.
Reimplemented in SurfaceGraphics, and ImegeGraphics.
Definition at line 441 of file graphics.h.
Referenced by Client::initGraphics().
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by ScrollArea::calcHBar(), ScrollArea::calcVBar(), Slider::draw(), and TestLauncher::testDraw().
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by TouchManager::draw(), Button::draw(), EmotePage::draw(), ItemContainer::draw(), Slider::draw(), Tab::draw(), Window::draw(), EquipmentWindow::draw(), AvatarListBox::draw(), and ShortcutContainer::drawBackground().
|
inlinevirtual |
Reimplemented in SurfaceGraphics, and ImegeGraphics.
Definition at line 224 of file graphics.h.
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by TestLauncher::testDraw(), and TestLauncher::testFps3().
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by ScrollArea::calcHMarker(), ScrollArea::calcVMarker(), TouchManager::draw(), Button::draw(), Popup::draw(), ProgressBar::draw(), Tab::draw(), Window::draw(), ScrollArea::drawFrame(), and TestLauncher::testDraw().
|
static |
Definition at line 159 of file graphics.cpp.
References mGLContext.
Referenced by Client::gameClear().
|
inlinevirtual |
Definition at line 456 of file graphics.h.
Referenced by Map::draw(), and TestLauncher::testTextures().
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
|
virtual |
Reimplemented in ModernOpenGLGraphics, and MobileOpenGL2Graphics.
Definition at line 418 of file graphics.cpp.
Referenced by MobileOpenGL2Graphics::createGLContext(), ModernOpenGLGraphics::createGLContext(), GraphicsManager::detectGraphics(), and setOpenGLMode().
|
inlinevirtual |
Definition at line 459 of file graphics.h.
|
pure virtual |
Blits an image onto the screen.
true
if the image was blitted properly false
otherwise. Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by Gui::draw(), Icon::draw(), BrowserBox::draw(), Button::draw(), CheckBox::draw(), Desktop::draw(), DropDown::draw(), ExtendedListBox::draw(), ItemContainer::draw(), ItemShortcutContainer::draw(), Label::draw(), ProgressBar::draw(), RadioButton::draw(), ShopListBox::draw(), SpellShortcutContainer::draw(), StaticBrowserBox::draw(), TextField::draw(), VirtShortcutContainer::draw(), Window::draw(), EquipmentWindow::draw(), OutfitWindow::draw(), SimpleAnimation::draw(), ImageSprite::draw(), MapItem::draw(), Text::draw(), Minimap::draw2(), CheckBox::drawBox(), RadioButton::drawBox(), DropDown::drawButton(), ScrollArea::drawButton(), Being::drawCompound(), CompoundSprite::drawSimple(), Font::drawString(), PRAGMA45(), TouchManager::safeDraw(), Icon::safeDraw(), Button::safeDraw(), EmotePage::safeDraw(), ItemContainer::safeDraw(), ItemShortcutContainer::safeDraw(), ProgressBar::safeDraw(), Slider::safeDraw(), SpellShortcutContainer::safeDraw(), Tab::safeDraw(), VirtShortcutContainer::safeDraw(), Window::safeDraw(), EquipmentWindow::safeDraw(), OutfitWindow::safeDraw(), AvatarListBox::safeDraw(), ShortcutContainer::safeDrawBackground(), TestLauncher::testBackend(), TestLauncher::testDraw(), TestLauncher::testFps2(), and TestLauncher::testTextures().
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by Text::draw(), DropDown::drawFrame(), PlayerBox::drawFrame(), TextField::drawFrame(), ScrollArea::drawHMarker(), ScrollArea::drawVMarker(), TouchManager::safeDraw(), Button::safeDraw(), Popup::safeDraw(), ProgressBar::safeDraw(), Tab::safeDraw(), Window::safeDraw(), DropDown::safeDrawFrame(), PlayerBox::safeDrawFrame(), ScrollArea::safeDrawFrame(), and TextField::safeDrawFrame().
|
pure virtual |
Ddraws a line.
x1 | The first x coordinate. |
y1 | The first y coordinate. |
x2 | The second x coordinate. |
y2 | The second y coordinate. |
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by BrowserBox::draw(), DropDown::draw(), StaticBrowserBox::draw(), AvatarListBox::draw(), TextBox::drawCaret(), TextField::drawCaret(), AvatarListBox::safeDraw(), and TestLauncher::testDraw().
|
virtual |
Reimplemented in SurfaceGraphics, and ImegeGraphics.
Definition at line 653 of file graphics.cpp.
References drawLine(), x, and y.
Referenced by TestLauncher::testDraw().
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by AmbientLayer::draw(), ScrollArea::drawHBar(), ScrollArea::drawVBar(), Slider::safeDraw(), and TestLauncher::testDraw().
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
|
pure virtual |
Draws a single point/pixel.
x | The x coordinate. |
y | The y coordinate. |
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by TestLauncher::testDraw().
|
pure virtual |
Draws a simple, non-filled, rectangle with a one pixel width.
rectangle | The rectangle to draw. |
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by DropDown::draw(), SpellShortcutContainer::draw(), OutfitWindow::draw(), CastingEffect::draw(), MapItem::draw(), Minimap::draw2(), SpellShortcutContainer::safeDraw(), OutfitWindow::safeDraw(), and TestLauncher::testDraw().
|
pure virtual |
Draws a resclaled version of the image
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by Desktop::draw(), and TestLauncher::testDraw().
|
pure virtual |
Draw a pattern based on a rescaled version of the given image...
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by AmbientLayer::draw(), and TestLauncher::testDraw().
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by TouchManager::draw(), Button::draw(), EmotePage::draw(), ItemContainer::draw(), Popup::draw(), ProgressBar::draw(), ScrollArea::draw(), Slider::draw(), Tab::draw(), Window::draw(), EquipmentWindow::draw(), AvatarListBox::draw(), ShortcutContainer::drawBackground(), ScrollArea::drawFrame(), and TestLauncher::testDraw().
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by TestLauncher::testDraw(), and TestLauncher::testFps3().
|
inlinevirtual |
Deinitializes drawing. Called by the Gui when a Gui::draw() is done. done. It should reset any state changes made by beginDraw().
NOTE: You will never need to call this function yourself, unless you use a Graphics object outside of Guichan.
Reimplemented in SurfaceGraphics, and ImegeGraphics.
Definition at line 453 of file graphics.h.
Referenced by ~Graphics().
|
pure virtual |
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by BasicContainer2::draw(), BrowserBox::draw(), ColorPage::draw(), Desktop::draw(), ExtendedListBox::draw(), GuiTable::draw(), ListBox::draw(), ProgressBar::draw(), ShopListBox::draw(), StaticBrowserBox::draw(), TextBox::draw(), TextPreview::draw(), OutfitWindow::draw(), Viewport::draw(), FloorItem::draw(), MapItem::draw(), AvatarListBox::draw(), Minimap::draw2(), Viewport::drawPath(), BasicContainer2::safeDraw(), GuiTable::safeDraw(), ProgressBar::safeDraw(), OutfitWindow::safeDraw(), AvatarListBox::safeDraw(), and TestLauncher::testDraw().
|
inlinevirtual |
Reimplemented in ModernOpenGLGraphics, and MobileOpenGL2Graphics.
Definition at line 465 of file graphics.h.
Referenced by TouchManager::draw(), Button::draw(), EmotePage::draw(), ItemContainer::draw(), Popup::draw(), ProgressBar::draw(), ScrollArea::draw(), Slider::draw(), Tab::draw(), Window::draw(), EquipmentWindow::draw(), AvatarListBox::draw(), ShortcutContainer::drawBackground(), ScrollArea::drawFrame(), TestLauncher::testDraw(), and TestLauncher::testFps3().
|
inlinevirtual |
Reimplemented in ModernOpenGLGraphics, and MobileOpenGL2Graphics.
Definition at line 469 of file graphics.h.
|
inline |
|
inline |
|
inline |
|
inline |
int Graphics::getHeight | ( | ) | const |
Returns the height of the screen.
Definition at line 648 of file graphics.cpp.
References mHeight.
Referenced by ChatWindow::ChatWindow(), Minimap::draw2(), CharCreateDialog::setButtonsPosition(), setConfigDefaults2(), PopupMenu::showPopup(), Client::stateGame(), and Client::stateGame1().
|
inline |
int Graphics::getMemoryUsage | ( | ) | const |
Definition at line 441 of file graphics.cpp.
References GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, graphicsManager, mStartFreeMem, and GraphicsManager::supportExtension().
|
inline |
|
inline |
Definition at line 308 of file graphics.h.
References mOpenGL.
Referenced by Game::Game(), setOpenGLMode(), and Game::slowLogic().
|
protected |
< Allow any video depth/pixel-format
< Create an OpenGL rendering context
< Surface is a full screen display
< This video mode may be resized
< No window caption or edge frame
Definition at line 242 of file graphics.cpp.
References mAllowHighDPI, mEnableResize, mFullscreen, and mNoFrame.
Referenced by setOpenGLMode().
|
inline |
Definition at line 287 of file graphics.h.
References mRedraw.
Referenced by Button::draw(), ItemContainer::draw(), ProgressBar::draw(), ScrollArea::draw(), Slider::draw(), Tab::draw(), and ScrollArea::updateCalcFlag().
|
inline |
Definition at line 366 of file graphics.h.
References mScale.
Referenced by WindowManager::applyScale(), Gui::getMouseState(), and SDLInput::pushInput().
|
inline |
Definition at line 293 of file graphics.h.
References mSecure.
Referenced by AvatarListBox::draw(), and AvatarListBox::safeDraw().
|
protected |
< Allow any video depth/pixel-format
< Surface is in video memory
< Set up double-buffered video mode
< Surface is in system memory
< Surface is a full screen display
< This video mode may be resized
< No window caption or edge frame
Definition at line 389 of file graphics.cpp.
References mAllowHighDPI, mEnableResize, mFullscreen, mHWAccel, and mNoFrame.
|
inline |
|
inline |
Definition at line 281 of file graphics.h.
References mClipStack, and MStack< T >::top().
Referenced by BrowserBox::draw(), Button::draw(), StaticBrowserBox::draw(), TextField::drawCaret(), and ScrollArea::updateCalcFlag().
int Graphics::getWidth | ( | ) | const |
Returns the width of the screen.
Definition at line 643 of file graphics.cpp.
References mWidth.
Referenced by CharacterDisplay::CharacterDisplay(), CharSelectDialog::CharSelectDialog(), ChatWindow::ChatWindow(), Minimap::draw2(), Client::stateGame(), and Client::stateGame1().
|
inline |
Definition at line 144 of file graphics.h.
References mWindow.
Referenced by WindowManager::applyGamma(), WindowManager::applyGrabMode(), GraphicsManager::detectPixelSize(), WindowManager::initTitle(), WindowManager::newChatMessage(), WindowManager::setIcon(), WindowManager::setIsMinimized(), GraphicsManager::updatePlanformExtensions(), and WindowManager::updateTitle().
|
inlinevirtual |
|
inlinevirtual |
Definition at line 369 of file graphics.h.
|
virtual |
Removes the top most clip area from the stack.
Exception | if the stack is empty. |
Reimplemented in SurfaceGraphics, and ImegeGraphics.
Definition at line 739 of file graphics.cpp.
References MStack< T >::empty(), mClipStack, and MStack< T >::pop().
Referenced by Gui::draw(), GuiTable::draw(), Minimap::draw2(), GuiTable::safeDraw(), and TestLauncher::testDraw().
|
inlinevirtual |
Reimplemented in ModernOpenGLGraphics, MobileOpenGLGraphics, and MobileOpenGL2Graphics.
Definition at line 462 of file graphics.h.
Referenced by Client::gameInit().
|
virtual |
Pushes a clip area onto the stack. The x and y coordinates in the rectangle is relative to the last pushed clip area. If the new area falls outside the current clip area, it will be clipped as necessary.
If a clip area is outside of the top clip area a clip area with zero width and height will be pushed.
area | The clip area to be pushed onto the stack. |
Reimplemented in SurfaceGraphics, and ImegeGraphics.
Definition at line 677 of file graphics.cpp.
References Rect::height, top, Rect::width, Rect::x, ClipRect::xOffset, Rect::y, and ClipRect::yOffset.
Referenced by Gui::draw(), GuiTable::draw(), Minimap::draw2(), GuiTable::safeDraw(), and TestLauncher::testDraw().
|
inlinevirtual |
Reimplemented in ModernOpenGLGraphics, and MobileOpenGL2Graphics.
Definition at line 476 of file graphics.h.
|
virtual |
Resize the window to the specified size.
Definition at line 558 of file graphics.cpp.
References beginDraw(), CAST_S32, endDraw(), RENDER_SOFTWARE, and setVideoMode().
Referenced by WindowManager::resizeVideo().
|
inlinevirtual |
Definition at line 179 of file graphics.h.
|
inlinevirtual |
Reimplemented in ModernOpenGLGraphics, and MobileOpenGL2Graphics.
Definition at line 481 of file graphics.h.
|
inlinevirtual |
Reimplemented in ModernOpenGLGraphics, and MobileOpenGL2Graphics.
Definition at line 320 of file graphics.h.
References mAlpha, and mColor.
Referenced by BasicContainer2::draw(), BrowserBox::draw(), ColorPage::draw(), Desktop::draw(), DropDown::draw(), ExtendedListBox::draw(), GuiTable::draw(), ListBox::draw(), ProgressBar::draw(), ShopListBox::draw(), SpellShortcutContainer::draw(), StaticBrowserBox::draw(), TextBox::draw(), TextPreview::draw(), OutfitWindow::draw(), Viewport::draw(), CastingEffect::draw(), FloorItem::draw(), MapItem::draw(), AvatarListBox::draw(), Minimap::draw2(), TextBox::drawCaret(), TextField::drawCaret(), Viewport::drawPath(), BasicContainer2::safeDraw(), GuiTable::safeDraw(), ProgressBar::safeDraw(), SpellShortcutContainer::safeDraw(), OutfitWindow::safeDraw(), AvatarListBox::safeDraw(), and TestLauncher::testDraw().
bool Graphics::setFullscreen | ( | const bool | fs | ) |
Set fullscreen mode.
Definition at line 542 of file graphics.cpp.
References setVideoMode().
Referenced by WindowManager::setFullScreen().
|
protected |
Definition at line 182 of file graphics.cpp.
References GroupDb::getName(), Logger::log(), and logger.
|
inline |
|
protected |
Definition at line 748 of file graphics.cpp.
References GL_DEPTH_BOUNDS_TEST_EXT, GL_DEPTH_CLAMP, GL_POLYGON_SMOOTH, GL_RASTERIZER_DISCARD, GL_SAMPLE_MASK, and GL_TEXTURE_COMPRESSION_HINT_ARB.
|
protected |
Definition at line 283 of file graphics.cpp.
References CAST_S32, CAST_U16, config, createGLContext(), GraphicsManager::createWindow(), Configuration::getBoolValue(), OpenGLImageHelper::getInternalTextureType(), GraphicsManager::getMaxVertices(), getOpenGL(), getOpenGLFlags(), GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB, GL_TEXTURE_RECTANGLE_ARB, graphicsManager, initArrays(), GraphicsManager::initOpenGL(), GraphicsManager::isUseTextureSampler(), Logger::log(), Logger::log1(), logger, GraphicsManager::logVersion(), mActualHeight, mActualWidth, mBpp, mRect, mScale, mSync, OpenGLImageHelper::mTextureSize, SafeOpenGLImageHelper::mTextureSize, OpenGLImageHelper::mTextureType, SafeOpenGLImageHelper::mTextureType, mWindow, RENDER_GLES2_OPENGL, RENDER_GLES_OPENGL, RENDER_MODERN_OPENGL, GraphicsManager::setGLVersion(), GraphicsManager::supportExtension(), updateMemoryInfo(), GraphicsManager::updateTextureCompressionFormat(), GraphicsManager::updateTextureFormat(), and videoInfo().
|
inline |
Definition at line 284 of file graphics.h.
References mRedraw.
Referenced by ScrollArea::draw(), and Window::draw().
void Graphics::setScale | ( | int | scale | ) |
Definition at line 206 of file graphics.cpp.
References isAllowScale(), Logger::log(), logger, and RectSize.
Referenced by WindowManager::applyScale().
|
inline |
Definition at line 290 of file graphics.h.
References mSecure.
Referenced by Game::createScreenshot().
void Graphics::setSync | ( | const bool | sync | ) |
Sets whether vertical refresh syncing is enabled. Takes effect after the next call to setVideoMode(). Only implemented on MacOS for now.
Definition at line 177 of file graphics.cpp.
References Ea::BeingRecv::mSync.
|
pure virtual |
Try to create a window with the given settings.
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by GraphicsManager::setVideoMode().
|
inline |
void Graphics::setWindowSize | ( | const int | width, |
const int | height | ||
) |
|
inlinevirtual |
Reimplemented in NormalOpenGLGraphics, ModernOpenGLGraphics, and MobileOpenGL2Graphics.
Definition at line 473 of file graphics.h.
Referenced by TestLauncher::testFps2().
|
protected |
Definition at line 426 of file graphics.cpp.
References GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, graphicsManager, Logger::log(), logger, mStartFreeMem, and GraphicsManager::supportExtension().
Referenced by setOpenGLMode().
|
pure virtual |
Updates the screen. This is done by either copying the buffer to the screen or swapping pages.
Implemented in SurfaceGraphics, and ImegeGraphics.
Referenced by Client::gameExec(), PRAGMA45(), TestLauncher::testBackend(), TestLauncher::testDraw(), TestLauncher::testFps2(), TestLauncher::testFps3(), and TestLauncher::testTextures().
|
protected |
< Set up double-buffered video mode
< Set up double-buffered video mode
Definition at line 483 of file graphics.cpp.
References ImageHelper::dumpSurfaceFormat(), Actions::info(), Logger::log(), Logger::log1(), logger, mDoubleBuffer, mWindow, and restrict.
Referenced by setOpenGLMode().
|
friend |
Definition at line 112 of file graphics.h.
|
friend |
Definition at line 115 of file graphics.h.
int Graphics::mActualHeight |
Definition at line 487 of file graphics.h.
Referenced by Setup_Video::action(), WindowManager::applyScale(), Setup_Video::cancel(), WindowManager::doResizeVideo(), ModeListModel::ModeListModel(), WindowManager::resizeVideo(), setOpenGLMode(), and Setup_Video::Setup_Video().
int Graphics::mActualWidth |
Definition at line 486 of file graphics.h.
Referenced by Setup_Video::action(), WindowManager::applyScale(), Setup_Video::cancel(), WindowManager::doResizeVideo(), ModeListModel::ModeListModel(), WindowManager::resizeVideo(), setOpenGLMode(), and Setup_Video::Setup_Video().
|
protected |
Definition at line 548 of file graphics.h.
Referenced by getOpenGLFlags(), and getSoftwareFlags().
|
protected |
Definition at line 538 of file graphics.h.
Referenced by disableTexturingAndBlending(), enableTexturingAndBlending(), and setColor().
|
protected |
Definition at line 537 of file graphics.h.
Referenced by getBpp(), and setOpenGLMode().
Holds the clip area stack.
Definition at line 521 of file graphics.h.
Referenced by getTopClip(), and popClipArea().
|
protected |
Definition at line 553 of file graphics.h.
Referenced by getColor(), restoreColor(), MobileOpenGL2Graphics::screenResized(), ModernOpenGLGraphics::screenResized(), and setColor().
|
protected |
Definition at line 542 of file graphics.h.
Referenced by getDoubleBuffer(), and videoInfo().
|
protected |
Definition at line 546 of file graphics.h.
Referenced by getOpenGLFlags(), and getSoftwareFlags().
|
protected |
Definition at line 539 of file graphics.h.
Referenced by getFullScreen(), getOpenGLFlags(), and getSoftwareFlags().
|
staticprotected |
Definition at line 533 of file graphics.h.
Referenced by cleanUp().
int Graphics::mHeight |
Definition at line 485 of file graphics.h.
Referenced by Window::adjustPositionAfterResize(), Window::adjustSizeToScreen(), AmbientLayer::AmbientLayer(), AmbientLayer::draw(), Window::ensureOnScreen(), Game::Game(), getHeight(), Viewport::getMouseTile(), MobileOpenGLScreenshotHelper::getScreenshot(), OpenGLScreenshotHelper::getScreenshot(), SdlScreenshotHelper::getScreenshot(), TouchManager::init(), TouchManager::loadTouchItem(), EventsManager::logEvent(), Window::mouseDragged(), ChatWindow::mouseDragged(), ShortcutWindow::mouseDragged(), Popup::position(), MobileOpenGL2Graphics::postInit(), ModernOpenGLGraphics::postInit(), Gui::postInit(), MobileOpenGLScreenshotHelper::prepare(), OpenGLScreenshotHelper::prepare(), TouchManager::resize(), WindowManager::resizeVideo(), Window::setDefaultSize(), Window::setLocationRelativeTo(), TextBoxPopup::show(), TextPopup::show(), CutInWindow::show(), PopupList::show(), PopupMenu::showPopup(), Viewport::updateMaxVars(), Viewport::updateMidVars(), Gui::videoResized(), SpellPopup::view(), and StatusPopup::view().
|
protected |
Definition at line 540 of file graphics.h.
Referenced by getHWAccel(), and getSoftwareFlags().
|
protected |
Definition at line 549 of file graphics.h.
Referenced by getName(), ImegeGraphics::ImegeGraphics(), MobileOpenGL2Graphics::MobileOpenGL2Graphics(), MobileOpenGLGraphics::MobileOpenGLGraphics(), ModernOpenGLGraphics::ModernOpenGLGraphics(), NormalOpenGLGraphics::NormalOpenGLGraphics(), NullOpenGLGraphics::NullOpenGLGraphics(), SDLGraphics::SDLGraphics(), and SurfaceGraphics::SurfaceGraphics().
|
protected |
Definition at line 547 of file graphics.h.
Referenced by getOpenGLFlags(), getSoftwareFlags(), and setNoFrame().
|
protected |
Definition at line 545 of file graphics.h.
Referenced by getOpenGL(), ImegeGraphics::ImegeGraphics(), MobileOpenGL2Graphics::MobileOpenGL2Graphics(), MobileOpenGLGraphics::MobileOpenGLGraphics(), ModernOpenGLGraphics::ModernOpenGLGraphics(), NormalOpenGLGraphics::NormalOpenGLGraphics(), NullOpenGLGraphics::NullOpenGLGraphics(), SDLGraphics::SDLGraphics(), and SurfaceGraphics::SurfaceGraphics().
|
protected |
Definition at line 543 of file graphics.h.
Referenced by Graphics(), setOpenGLMode(), and setWindow().
|
protected |
Definition at line 541 of file graphics.h.
Referenced by getRedraw(), and setRedraw().
|
protected |
Definition at line 552 of file graphics.h.
Referenced by getScale(), and setOpenGLMode().
|
protected |
Definition at line 544 of file graphics.h.
Referenced by getSecure(), and setSecure().
|
protected |
Definition at line 550 of file graphics.h.
Referenced by getMemoryUsage(), and updateMemoryInfo().
|
protected |
Definition at line 551 of file graphics.h.
Referenced by getSync(), and setOpenGLMode().
int Graphics::mWidth |
Definition at line 484 of file graphics.h.
Referenced by Window::adjustPositionAfterResize(), Window::adjustSizeToScreen(), AmbientLayer::AmbientLayer(), AmbientLayer::draw(), WindowMenu::drawChildren(), Window::ensureOnScreen(), Game::Game(), MobileOpenGLScreenshotHelper::getScreenshot(), OpenGLScreenshotHelper::getScreenshot(), SdlScreenshotHelper::getScreenshot(), getWidth(), TouchManager::init(), InventoryWindow::InventoryWindow(), TouchManager::loadTouchItem(), EventsManager::logEvent(), Window::mouseDragged(), ChatWindow::mouseDragged(), ShortcutWindow::mouseDragged(), Popup::position(), MobileOpenGL2Graphics::postInit(), ModernOpenGLGraphics::postInit(), Gui::postInit(), MobileOpenGLScreenshotHelper::prepare(), OpenGLScreenshotHelper::prepare(), Setup_Input::refreshAssignedKey(), TouchManager::resize(), WindowManager::resizeVideo(), WindowMenu::safeDrawChildren(), Window::setDefaultSize(), Window::setLocationRelativeTo(), Setup_Theme::Setup_Theme(), ShopWindow::ShopWindow(), TextBoxPopup::show(), TextPopup::show(), CutInWindow::show(), PopupList::show(), PopupMenu::showPopup(), WindowMenu::updateButtons(), Viewport::updateMaxVars(), Viewport::updateMidVars(), Gui::videoResized(), SpellPopup::view(), StatusPopup::view(), and WindowMenu::WindowMenu().
|
protected |
Definition at line 523 of file graphics.h.
Referenced by SdlScreenshotHelper::getScreenshot(), getWindow(), setOpenGLMode(), setWindow(), and videoInfo().