|
FIFE
|
Abstract interface for all the renderbackends. More...
#include <renderbackend.h>
Inheritance diagram for FIFE::RenderBackend:
Collaboration diagram for FIFE::RenderBackend:Classes | |
| class | ClipInfo |
Public Member Functions | |
| RenderBackend (const SDL_Color &colorkey) | |
| Constructor. More... | |
| virtual | ~RenderBackend () |
| Destructor. More... | |
| virtual const std::string & | getName () const =0 |
| The name of the renderbackend. More... | |
| virtual void | startFrame () |
| Called when a new frame starts. More... | |
| virtual void | endFrame () |
| Called when a frame is finished and ready to be displayed. More... | |
| virtual void | init (const std::string &driver)=0 |
| Initializes the backend. More... | |
| virtual void | clearBackBuffer ()=0 |
| Forces a clear of the backbuffer. More... | |
| virtual void | setLightingModel (uint32_t lighting)=0 |
| Initializes the light. More... | |
| virtual uint32_t | getLightingModel () const =0 |
| Gets the current light model. More... | |
| virtual void | setLighting (float red, float green, float blue)=0 |
| Set colors for lighting. More... | |
| virtual void | resetLighting ()=0 |
| Reset lighting with default values. More... | |
| virtual void | resetStencilBuffer (uint8_t buffer)=0 |
| Reset stencil buffer with given value. More... | |
| virtual void | changeBlending (int32_t scr, int32_t dst)=0 |
| Change the Blendingmodel. More... | |
| void | deinit () |
| Performs cleanup actions. More... | |
| virtual void | createMainScreen (const ScreenMode &mode, const std::string &title, const std::string &icon)=0 |
| Creates the mainscreen (the display window). More... | |
| virtual void | setScreenMode (const ScreenMode &mode)=0 |
| Sets the mainscreen display mode. More... | |
| virtual Image * | createImage (IResourceLoader *loader=0)=0 |
| virtual Image * | createImage (const std::string &name, IResourceLoader *loader=0)=0 |
| virtual Image * | createImage (const uint8_t *data, uint32_t width, uint32_t height)=0 |
| Creates an Image suitable for this renderbackend. More... | |
| virtual Image * | createImage (const std::string &name, const uint8_t *data, uint32_t width, uint32_t height)=0 |
| virtual Image * | createImage (SDL_Surface *surface)=0 |
| Helper function to create images from SDL_Surfaces. More... | |
| virtual Image * | createImage (const std::string &name, SDL_Surface *surface)=0 |
| virtual void | renderVertexArrays ()=0 |
| Render the Vertex Arrays, only for primitives (points, lines,...) More... | |
| virtual void | addImageToArray (uint32_t id, const Rect &rec, float const *st, uint8_t alpha, uint8_t const *rgba)=0 |
| Add the Image data to the array. More... | |
| virtual void | changeRenderInfos (RenderDataType type, uint16_t elements, int32_t src, int32_t dst, bool light, bool stentest, uint8_t stenref, GLConstants stenop, GLConstants stenfunc, OverlayType otype=OVERLAY_TYPE_NONE)=0 |
| Dirty helper function to change the render infos. More... | |
| virtual void | captureScreen (const std::string &filename)=0 |
| Creates a Screenshot and saves it to a file. More... | |
| virtual void | captureScreen (const std::string &filename, uint32_t width, uint32_t height)=0 |
| Creates a Screenshot with the given size(w,h) and saves it to a file. More... | |
| const ScreenMode & | getCurrentScreenMode () const |
| Get current screen mode. More... | |
| uint32_t | getWidth () const |
| uint32_t | getHeight () const |
| uint32_t | getScreenWidth () const |
| uint32_t | getScreenHeight () const |
| const Rect & | getArea () const |
| void | pushClipArea (const Rect &cliparea, bool clear=true) |
| Pushes clip area to clip stack Clip areas define which area is drawn on screen. More... | |
| void | popClipArea () |
| Pops clip area from clip stack. More... | |
| const Rect & | getClipArea () const |
| Gets the current clip area. More... | |
| virtual bool | putPixel (int32_t x, int32_t y, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0 |
| Writes pixel to given position. More... | |
| virtual void | drawLine (const Point &p1, const Point &p2, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0 |
| Draws line between given points with given RGBA. More... | |
| virtual void | drawTriangle (const Point &p1, const Point &p2, const Point &p3, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0 |
| Draws triangle between given points with given RGBA. More... | |
| virtual void | drawRectangle (const Point &p, uint16_t w, uint16_t h, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0 |
| Draws an axis parallel rectangle. More... | |
| virtual void | fillRectangle (const Point &p, uint16_t w, uint16_t h, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0 |
| Draws a filled axis parallel rectangle. More... | |
| virtual void | drawQuad (const Point &p1, const Point &p2, const Point &p3, const Point &p4, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0 |
| Draws quad between given points with given RGBA. More... | |
| virtual void | drawVertex (const Point &p, const uint8_t size, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0 |
| Draws a quad that represents a vertex with given RGBA. More... | |
| virtual void | drawLightPrimitive (const Point &p, uint8_t intensity, float radius, int32_t subdivisions, float xstretch, float ystretch, uint8_t red, uint8_t green, uint8_t blue)=0 |
| Draws a light primitive that based on a triangle fan. More... | |
| virtual void | enableScissorTest ()=0 |
| Enables scissor test on the render backend. More... | |
| virtual void | disableScissorTest ()=0 |
| Disables scissor test on the render backend. More... | |
| void | setAlphaOptimizerEnabled (bool enabled) |
| Enable or disable the alpha 'optimizing' code. More... | |
| bool | isAlphaOptimizerEnabled () const |
| void | setImageCompressingEnabled (bool enabled) |
| Enables or disable compressing images by video driver. More... | |
| bool | isImageCompressingEnabled () const |
| void | setFramebufferEnabled (bool enabled) |
| Enables or disable the usage of the framebuffer, if available. More... | |
| bool | isFramebufferEnabled () const |
| void | setNPOTEnabled (bool enabled) |
| Enables or disable the usage of npot, if available. More... | |
| bool | isNPOTEnabled () const |
| void | setTextureFiltering (TextureFiltering filter) |
| Sets the texture filtering method. More... | |
| TextureFiltering | getTextureFiltering () const |
| void | setMipmappingEnabled (bool enabled) |
| Enables or disables the usage of mipmapping. More... | |
| bool | isMipmappingEnabled () const |
| int32_t | getMaxAnisotropy () const |
| Gets max antisotropy for antisotropic filtering. More... | |
| void | setMonochromeEnabled (bool enabled) |
| Enables or disables monochrome rendering. More... | |
| bool | isMonochromeEnabled () const |
| void | setDepthBufferEnabled (bool enabled) |
| Enables or disables depth buffer rendering. More... | |
| bool | isDepthBufferEnabled () const |
| void | setAlphaTestValue (float alpha) |
| Sets the value for alpha test. More... | |
| float | getAlphaTestValue () const |
| void | setColorKeyEnabled (bool colorkeyenable) |
| Sets whether to use the colorkey feature. More... | |
| bool | isColorKeyEnabled () const |
| Gets whether the colorkey feature is in use. More... | |
| void | setColorKey (const SDL_Color &colorkey) |
| Sets the global colorkey to use for images. More... | |
| const SDL_Color & | getColorKey () const |
| Gets the global colorkey setting. More... | |
| void | setBackgroundColor (uint8_t r, uint8_t g, uint8_t b) |
| Set the background color. More... | |
| void | resetBackgroundColor () |
| Reset the background color to black. More... | |
| const SDL_PixelFormat & | getPixelFormat () const |
| Gets the current screen rgba format. More... | |
| void | setFrameLimitEnabled (bool limited) |
| Sets whether to use the frame limiter. More... | |
| bool | isFrameLimitEnabled () const |
| Gets whether the frame limiter is in use. More... | |
| void | setFrameLimit (uint16_t framelimit) |
| Sets the frame limit. More... | |
| uint16_t | getFrameLimit () const |
| Gets the frame limit. More... | |
| SDL_Surface * | getRenderTargetSurface () |
| Returns currently attached render surface. More... | |
| virtual void | attachRenderTarget (ImagePtr &img, bool discard)=0 |
| Attaches given image as a new render surface. More... | |
| virtual void | detachRenderTarget ()=0 |
| Detaches current render surface. More... | |
| virtual void | renderGuiGeometry (const std::vector< GuiVertex > &vertices, const std::vector< int > &indices, const DoublePoint &translation, ImagePtr texture)=0 |
| Renders geometry required by gui. More... | |
Public Member Functions inherited from FIFE::DynamicSingleton< RenderBackend > | |
| DynamicSingleton () | |
| virtual | ~DynamicSingleton () |
Protected Member Functions | |
| virtual void | setClipArea (const Rect &cliparea, bool clear)=0 |
| Sets given clip area into image. More... | |
| void | clearClipArea () |
| Clears any possible clip areas. More... | |
Protected Attributes | |
| SDL_Surface * | m_screen |
| SDL_Surface * | m_target |
| bool | m_compressimages |
| bool | m_useframebuffer |
| bool | m_usenpot |
| bool | m_isalphaoptimized |
| bool | m_iscolorkeyenabled |
| SDL_Color | m_colorkey |
| ScreenMode | m_screenMode |
| SDL_PixelFormat | m_rgba_format |
| bool | m_isbackgroundcolor |
| SDL_Color | m_backgroundcolor |
| bool | m_isMipmapping |
| TextureFiltering | m_textureFilter |
| int32_t | m_maxAnisotropy |
| bool | m_monochrome |
| bool | m_isDepthBuffer |
| float | m_alphaValue |
| std::stack< ClipInfo > | m_clipstack |
| ClipInfo | m_guiClip |
Private Attributes | |
| bool | m_isframelimit |
| uint32_t | m_frame_start |
| uint16_t | m_framelimit |
Additional Inherited Members | |
Static Public Member Functions inherited from FIFE::DynamicSingleton< RenderBackend > | |
| static RenderBackend * | instance () |
Abstract interface for all the renderbackends.
Definition at line 121 of file renderbackend.h.
| FIFE::RenderBackend::RenderBackend | ( | const SDL_Color & | colorkey | ) |
Constructor.
| colorkey | The colorkey to use. |
Definition at line 34 of file renderbackend.cpp.
References m_backgroundcolor, and m_isbackgroundcolor.
|
virtual |
Destructor.
Definition at line 59 of file renderbackend.cpp.
|
pure virtual |
Add the Image data to the array.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::GLImage::render().
Here is the caller graph for this function:
|
pure virtual |
Attaches given image as a new render surface.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::TargetRenderer::render(), and FIFE::Camera::renderStaticLayer().
Here is the caller graph for this function:
|
pure virtual |
Creates a Screenshot and saves it to a file.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
|
pure virtual |
Creates a Screenshot with the given size(w,h) and saves it to a file.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
|
pure virtual |
Change the Blendingmodel.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
|
pure virtual |
Dirty helper function to change the render infos.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::GenericRendererLineInfo::render(), FIFE::GenericRendererPointInfo::render(), FIFE::FloatingTextRenderer::render(), FIFE::GenericRendererTriangleInfo::render(), FIFE::LightRendererImageInfo::render(), FIFE::GenericRendererQuadInfo::render(), FIFE::LightRendererAnimationInfo::render(), FIFE::GenericRendererVertexInfo::render(), FIFE::LightRendererSimpleLightInfo::render(), FIFE::LightRendererResizeInfo::render(), FIFE::GenericRendererTextInfo::render(), FIFE::InstanceRenderer::renderAlreadySorted(), FIFE::InstanceRenderer::renderOverlay(), and FIFE::InstanceRenderer::renderUnsorted().
Here is the caller graph for this function:
|
pure virtual |
Forces a clear of the backbuffer.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::Engine::pump().
Here is the caller graph for this function:
|
protected |
Clears any possible clip areas.
Definition at line 131 of file renderbackend.cpp.
References getArea(), and setClipArea().
|
pure virtual |
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::InstanceRenderer::bindColoring(), FIFE::InstanceRenderer::bindMultiOutline(), FIFE::InstanceRenderer::bindOutline(), FIFE::ImageManager::create(), FIFE::LibRocketRenderInterface::GenerateTexture(), FIFE::FontBase::getAsImage(), FIFE::FontBase::getAsImageMultiline(), FIFE::InstanceRenderer::getMultiColorOverlay(), and FIFE::ImageManager::loadBlank().
Here is the caller graph for this function:
|
pure virtual |
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
|
pure virtual |
Creates an Image suitable for this renderbackend.
| data | Pointer to the imagedata (needs to be in RGBA, 8 bits per channel). |
| width | Width of the image. |
| height | Height of the image. |
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
|
pure virtual |
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
|
pure virtual |
Helper function to create images from SDL_Surfaces.
Takes ownership over the surface.
| surface | The surface to convert. |
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
|
pure virtual |
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
|
pure virtual |
Creates the mainscreen (the display window).
| mode | The ScreenMode to use. |
| title | The window title to use. |
| icon | The window icon to use. |
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::Engine::init().
Here is the caller graph for this function:| void FIFE::RenderBackend::deinit | ( | ) |
Performs cleanup actions.
Definition at line 62 of file renderbackend.cpp.
Referenced by FIFE::RenderBackendOpenGL::~RenderBackendOpenGL(), and FIFE::RenderBackendSDL::~RenderBackendSDL().
Here is the caller graph for this function:
|
pure virtual |
Detaches current render surface.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::TargetRenderer::render(), and FIFE::Camera::renderStaticLayer().
Here is the caller graph for this function:
|
pure virtual |
Disables scissor test on the render backend.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::LibRocketRenderInterface::render().
Here is the caller graph for this function:
|
pure virtual |
Draws a light primitive that based on a triangle fan.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::LightRendererSimpleLightInfo::render().
Here is the caller graph for this function:
|
pure virtual |
Draws line between given points with given RGBA.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::OffRendererLineInfo::render(), FIFE::GenericRendererLineInfo::render(), FIFE::GridRenderer::render(), FIFE::CellSelectionRenderer::render(), FIFE::BlockingInfoRenderer::render(), FIFE::CellRenderer::render(), and FIFE::RenderVisitor::visit().
Here is the caller graph for this function:
|
pure virtual |
Draws quad between given points with given RGBA.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::OffRendererQuadInfo::render(), and FIFE::GenericRendererQuadInfo::render().
Here is the caller graph for this function:
|
pure virtual |
Draws an axis parallel rectangle.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::FloatingTextRenderer::render().
Here is the caller graph for this function:
|
pure virtual |
Draws triangle between given points with given RGBA.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::OffRendererTriangleInfo::render(), and FIFE::GenericRendererTriangleInfo::render().
Here is the caller graph for this function:
|
pure virtual |
Draws a quad that represents a vertex with given RGBA.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::OffRendererVertexInfo::render(), and FIFE::GenericRendererVertexInfo::render().
Here is the caller graph for this function:
|
pure virtual |
Enables scissor test on the render backend.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::LibRocketRenderInterface::render().
Here is the caller graph for this function:
|
virtual |
Called when a frame is finished and ready to be displayed.
Reimplemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Definition at line 75 of file renderbackend.cpp.
References m_frame_start, m_framelimit, and m_isframelimit.
Referenced by FIFE::RenderBackendOpenGL::endFrame(), FIFE::RenderBackendSDL::endFrame(), and FIFE::Engine::pump().
Here is the caller graph for this function:
|
pure virtual |
Draws a filled axis parallel rectangle.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::FloatingTextRenderer::render(), and FIFE::Camera::renderOverlay().
Here is the caller graph for this function:| float FIFE::RenderBackend::getAlphaTestValue | ( | ) | const |
| const Rect & FIFE::RenderBackend::getArea | ( | ) | const |
Definition at line 97 of file renderbackend.cpp.
References m_screen.
Referenced by clearClipArea(), getClipArea(), popClipArea(), and FIFE::EventManager::processMouseEvent().
Here is the caller graph for this function:| const Rect & FIFE::RenderBackend::getClipArea | ( | ) | const |
Gets the current clip area.
Definition at line 123 of file renderbackend.cpp.
References getArea(), and m_clipstack.
| const SDL_Color & FIFE::RenderBackend::getColorKey | ( | ) | const |
Gets the global colorkey setting.
Definition at line 191 of file renderbackend.cpp.
References m_colorkey.
Referenced by FIFE::GLImage::resetGlimage(), FIFE::SDLImage::resetSdlimage(), and FIFE::SubImageFont::SubImageFont().
Here is the caller graph for this function:| const ScreenMode & FIFE::RenderBackend::getCurrentScreenMode | ( | ) | const |
Get current screen mode.
Definition at line 85 of file renderbackend.cpp.
References m_screenMode.
| uint16_t FIFE::RenderBackend::getFrameLimit | ( | ) | const |
| uint32_t FIFE::RenderBackend::getHeight | ( | ) | const |
Definition at line 93 of file renderbackend.cpp.
References m_screen.
Referenced by FIFE::RenderBackendSDL::captureScreen(), FIFE::RenderBackendOpenGL::captureScreen(), FIFE::RenderBackendSDL::clearBackBuffer(), getScreenHeight(), FIFE::FloatingTextRenderer::render(), FIFE::Camera::renderStaticLayer(), and FIFE::RenderBackendOpenGL::setClipArea().
Here is the caller graph for this function:
|
pure virtual |
Gets the current light model.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::GenericRendererLineInfo::render(), FIFE::GenericRendererPointInfo::render(), FIFE::FloatingTextRenderer::render(), FIFE::GenericRendererTriangleInfo::render(), FIFE::LightRendererImageInfo::render(), FIFE::GenericRendererQuadInfo::render(), FIFE::LightRendererAnimationInfo::render(), FIFE::GenericRendererVertexInfo::render(), FIFE::LightRendererSimpleLightInfo::render(), FIFE::LightRendererResizeInfo::render(), FIFE::GenericRendererTextInfo::render(), FIFE::LightRenderer::render(), FIFE::Camera::render(), FIFE::InstanceRenderer::renderAlreadySorted(), and FIFE::InstanceRenderer::renderUnsorted().
Here is the caller graph for this function:| int32_t FIFE::RenderBackend::getMaxAnisotropy | ( | ) | const |
Gets max antisotropy for antisotropic filtering.
Definition at line 151 of file renderbackend.cpp.
References m_maxAnisotropy.
|
pure virtual |
The name of the renderbackend.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::InstanceRenderer::InstanceRenderer(), FIFE::ImageLoader::load(), and FIFE::Camera::renderStaticLayer().
Here is the caller graph for this function:| const SDL_PixelFormat & FIFE::RenderBackend::getPixelFormat | ( | ) | const |
Gets the current screen rgba format.
Definition at line 208 of file renderbackend.cpp.
References m_rgba_format.
Referenced by FIFE::ImageLoader::load().
Here is the caller graph for this function:| SDL_Surface * FIFE::RenderBackend::getRenderTargetSurface | ( | ) |
Returns currently attached render surface.
Definition at line 228 of file renderbackend.cpp.
References m_target.
Referenced by FIFE::GLImage::generateGLTexture(), FIFE::SDLImage::render(), FIFE::GLImage::render(), and FIFE::GLImage::renderZ().
Here is the caller graph for this function:
|
inline |
Definition at line 241 of file renderbackend.h.
References getHeight().
Referenced by FIFE::MapLoader::load(), and FIFE::Console::reLayout().
Here is the caller graph for this function:
|
inline |
Definition at line 240 of file renderbackend.h.
References getWidth().
Referenced by FIFE::MapLoader::load(), and FIFE::Console::reLayout().
Here is the caller graph for this function:| TextureFiltering FIFE::RenderBackend::getTextureFiltering | ( | ) | const |
Definition at line 139 of file renderbackend.cpp.
References m_textureFilter.
| uint32_t FIFE::RenderBackend::getWidth | ( | ) | const |
Definition at line 89 of file renderbackend.cpp.
References m_screen.
Referenced by FIFE::RenderBackendSDL::captureScreen(), FIFE::RenderBackendOpenGL::captureScreen(), FIFE::RenderBackendSDL::clearBackBuffer(), getScreenWidth(), and FIFE::FloatingTextRenderer::render().
Here is the caller graph for this function:
|
pure virtual |
Initializes the backend.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::Engine::init().
Here is the caller graph for this function:
|
inline |
Definition at line 309 of file renderbackend.h.
References m_isalphaoptimized.
Referenced by FIFE::SDLImage::finalize().
Here is the caller graph for this function:| bool FIFE::RenderBackend::isColorKeyEnabled | ( | ) | const |
Gets whether the colorkey feature is in use.
Definition at line 183 of file renderbackend.cpp.
References m_iscolorkeyenabled.
Referenced by FIFE::GLImage::generateGLTexture().
Here is the caller graph for this function:| bool FIFE::RenderBackend::isDepthBufferEnabled | ( | ) | const |
Definition at line 167 of file renderbackend.cpp.
References m_isDepthBuffer.
Referenced by FIFE::InstanceRenderer::InstanceRenderer().
Here is the caller graph for this function:
|
inline |
Definition at line 326 of file renderbackend.h.
References m_useframebuffer.
Referenced by FIFE::CellRenderer::CellRenderer().
Here is the caller graph for this function:| bool FIFE::RenderBackend::isFrameLimitEnabled | ( | ) | const |
Gets whether the frame limiter is in use.
Definition at line 216 of file renderbackend.cpp.
References m_isframelimit.
|
inline |
Definition at line 318 of file renderbackend.h.
References m_compressimages.
Referenced by FIFE::GuiImageLoader::load().
Here is the caller graph for this function:| bool FIFE::RenderBackend::isMipmappingEnabled | ( | ) | const |
Definition at line 147 of file renderbackend.cpp.
References m_isMipmapping.
Referenced by FIFE::GLImage::generateGLTexture().
Here is the caller graph for this function:| bool FIFE::RenderBackend::isMonochromeEnabled | ( | ) | const |
Definition at line 159 of file renderbackend.cpp.
References m_monochrome.
Referenced by FIFE::GLImage::generateGLTexture().
Here is the caller graph for this function:
|
inline |
| void FIFE::RenderBackend::popClipArea | ( | ) |
Pops clip area from clip stack.
Definition at line 110 of file renderbackend.cpp.
References getArea(), m_clipstack, FIFE::RenderBackend::ClipInfo::r, and setClipArea().
Referenced by FIFE::OpenGLGuiGraphics::_endDraw(), FIFE::Cursor::draw(), FIFE::OpenGLGuiGraphics::popClipArea(), FIFE::LibRocketRenderInterface::render(), FIFE::OffRenderer::render(), FIFE::Camera::render(), and FIFE::Camera::renderStaticLayer().
Here is the caller graph for this function:| void FIFE::RenderBackend::pushClipArea | ( | const Rect & | cliparea, |
| bool | clear = true |
||
| ) |
Pushes clip area to clip stack Clip areas define which area is drawn on screen.
Usable e.g. with viewports note that previous items in stack do not affect the latest area pushed
Definition at line 102 of file renderbackend.cpp.
References FIFE::RenderBackend::ClipInfo::clearing, m_clipstack, FIFE::RenderBackend::ClipInfo::r, and setClipArea().
Referenced by FIFE::OpenGLGuiGraphics::_beginDraw(), FIFE::Cursor::draw(), FIFE::OpenGLGuiGraphics::pushClipArea(), FIFE::LibRocketRenderInterface::render(), FIFE::OffRenderer::render(), FIFE::Camera::render(), and FIFE::Camera::renderStaticLayer().
Here is the caller graph for this function:
|
pure virtual |
Writes pixel to given position.
Returns true, if pixel was written (not out of bounds)
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::OffRendererPointInfo::render(), and FIFE::GenericRendererPointInfo::render().
Here is the caller graph for this function:
|
pure virtual |
Renders geometry required by gui.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::LibRocketRenderInterface::render().
Here is the caller graph for this function:
|
pure virtual |
Render the Vertex Arrays, only for primitives (points, lines,...)
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::Cursor::draw(), FIFE::OffRenderer::render(), FIFE::Camera::render(), and FIFE::Camera::renderStaticLayer().
Here is the caller graph for this function:| void FIFE::RenderBackend::resetBackgroundColor | ( | ) |
Reset the background color to black.
Definition at line 204 of file renderbackend.cpp.
References setBackgroundColor().
|
pure virtual |
Reset lighting with default values.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::Camera::render(), and FIFE::Camera::resetLightingColor().
Here is the caller graph for this function:
|
pure virtual |
Reset stencil buffer with given value.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::Camera::render().
Here is the caller graph for this function:
|
inline |
Enable or disable the alpha 'optimizing' code.
| enabled | Optimize whether the image shall be analysed for 'fake' alpha images. Only implemented by and useful for the SDL backend at the moment. |
Definition at line 305 of file renderbackend.h.
References m_isalphaoptimized.
| void FIFE::RenderBackend::setAlphaTestValue | ( | float | alpha | ) |
Sets the value for alpha test.
Discards a fragment if its value is not greater. Only used if depth buffer is enabled. Note! Works only for OpenGL backend.
Definition at line 171 of file renderbackend.cpp.
References m_alphaValue.
Referenced by FIFE::Engine::init().
Here is the caller graph for this function:| void FIFE::RenderBackend::setBackgroundColor | ( | uint8_t | r, |
| uint8_t | g, | ||
| uint8_t | b | ||
| ) |
Set the background color.
Definition at line 195 of file renderbackend.cpp.
References m_backgroundcolor, and m_isbackgroundcolor.
Referenced by resetBackgroundColor().
Here is the caller graph for this function:
|
protectedpure virtual |
Sets given clip area into image.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by clearClipArea(), popClipArea(), and pushClipArea().
Here is the caller graph for this function:| void FIFE::RenderBackend::setColorKey | ( | const SDL_Color & | colorkey | ) |
Sets the global colorkey to use for images.
Definition at line 187 of file renderbackend.cpp.
References m_colorkey.
| void FIFE::RenderBackend::setColorKeyEnabled | ( | bool | colorkeyenable | ) |
Sets whether to use the colorkey feature.
Definition at line 179 of file renderbackend.cpp.
References m_iscolorkeyenabled.
Referenced by FIFE::Engine::init().
Here is the caller graph for this function:| void FIFE::RenderBackend::setDepthBufferEnabled | ( | bool | enabled | ) |
Enables or disables depth buffer rendering.
Note! Works only for OpenGL backend.
Definition at line 163 of file renderbackend.cpp.
References m_isDepthBuffer.
Referenced by FIFE::Engine::init().
Here is the caller graph for this function:
|
inline |
Enables or disable the usage of the framebuffer, if available.
Definition at line 322 of file renderbackend.h.
References m_useframebuffer.
Referenced by FIFE::Engine::init().
Here is the caller graph for this function:| void FIFE::RenderBackend::setFrameLimit | ( | uint16_t | framelimit | ) |
Sets the frame limit.
Definition at line 220 of file renderbackend.cpp.
References m_framelimit.
Referenced by FIFE::Engine::init().
Here is the caller graph for this function:| void FIFE::RenderBackend::setFrameLimitEnabled | ( | bool | limited | ) |
Sets whether to use the frame limiter.
Definition at line 212 of file renderbackend.cpp.
References m_isframelimit.
Referenced by FIFE::Engine::init().
Here is the caller graph for this function:
|
inline |
Enables or disable compressing images by video driver.
Definition at line 314 of file renderbackend.h.
References m_compressimages.
Referenced by FIFE::Engine::init(), and FIFE::GuiImageLoader::load().
Here is the caller graph for this function:
|
pure virtual |
Set colors for lighting.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::Camera::render().
Here is the caller graph for this function:
|
pure virtual |
Initializes the light.
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::Engine::init().
Here is the caller graph for this function:| void FIFE::RenderBackend::setMipmappingEnabled | ( | bool | enabled | ) |
Enables or disables the usage of mipmapping.
Note! Works only for OpenGL backends.
Definition at line 143 of file renderbackend.cpp.
References m_isMipmapping.
Referenced by FIFE::Engine::init().
Here is the caller graph for this function:| void FIFE::RenderBackend::setMonochromeEnabled | ( | bool | enabled | ) |
Enables or disables monochrome rendering.
Note! Works only for OpenGL backends.
Definition at line 155 of file renderbackend.cpp.
References m_monochrome.
Referenced by FIFE::Engine::init().
Here is the caller graph for this function:
|
inline |
Enables or disable the usage of npot, if available.
Definition at line 330 of file renderbackend.h.
References m_usenpot.
Referenced by FIFE::Engine::init().
Here is the caller graph for this function:
|
pure virtual |
Sets the mainscreen display mode.
| mode | The ScreenMode to change the display to. |
Implemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Referenced by FIFE::Engine::changeScreenMode().
Here is the caller graph for this function:| void FIFE::RenderBackend::setTextureFiltering | ( | TextureFiltering | filter | ) |
Sets the texture filtering method.
Supports none, bilinear, trilinear and anisotropic filtering. Note! Works only for OpenGL backends.
Definition at line 135 of file renderbackend.cpp.
References m_textureFilter.
Referenced by FIFE::Engine::init().
Here is the caller graph for this function:
|
virtual |
Called when a new frame starts.
Reimplemented in FIFE::RenderBackendOpenGL, and FIFE::RenderBackendSDL.
Definition at line 69 of file renderbackend.cpp.
References m_frame_start, and m_isframelimit.
Referenced by FIFE::Engine::pump(), FIFE::RenderBackendSDL::startFrame(), and FIFE::RenderBackendOpenGL::startFrame().
Here is the caller graph for this function:
|
protected |
Definition at line 480 of file renderbackend.h.
Referenced by getAlphaTestValue(), FIFE::RenderBackendOpenGL::renderWithColorAndZ(), setAlphaTestValue(), and FIFE::RenderBackendOpenGL::setScreenMode().
|
protected |
Definition at line 467 of file renderbackend.h.
Referenced by RenderBackend(), setBackgroundColor(), FIFE::RenderBackendSDL::setClipArea(), and FIFE::RenderBackendOpenGL::setClipArea().
|
protected |
Definition at line 492 of file renderbackend.h.
Referenced by getClipArea(), popClipArea(), and pushClipArea().
|
protected |
Definition at line 462 of file renderbackend.h.
Referenced by getColorKey(), and setColorKey().
|
protected |
Definition at line 457 of file renderbackend.h.
Referenced by isImageCompressingEnabled(), and setImageCompressingEnabled().
|
private |
Definition at line 497 of file renderbackend.h.
Referenced by endFrame(), and startFrame().
|
private |
Definition at line 498 of file renderbackend.h.
Referenced by endFrame(), getFrameLimit(), and setFrameLimit().
|
protected |
Definition at line 494 of file renderbackend.h.
|
protected |
Definition at line 460 of file renderbackend.h.
Referenced by isAlphaOptimizerEnabled(), and setAlphaOptimizerEnabled().
|
protected |
Definition at line 466 of file renderbackend.h.
Referenced by RenderBackend(), setBackgroundColor(), FIFE::RenderBackendSDL::setClipArea(), and FIFE::RenderBackendOpenGL::setClipArea().
|
protected |
Definition at line 461 of file renderbackend.h.
Referenced by isColorKeyEnabled(), and setColorKeyEnabled().
|
protected |
Definition at line 478 of file renderbackend.h.
Referenced by isDepthBufferEnabled(), and setDepthBufferEnabled().
|
private |
Definition at line 496 of file renderbackend.h.
Referenced by endFrame(), isFrameLimitEnabled(), setFrameLimitEnabled(), and startFrame().
|
protected |
Definition at line 470 of file renderbackend.h.
Referenced by isMipmappingEnabled(), and setMipmappingEnabled().
|
protected |
Definition at line 474 of file renderbackend.h.
Referenced by getMaxAnisotropy(), and FIFE::RenderBackendOpenGL::setScreenMode().
|
protected |
Definition at line 476 of file renderbackend.h.
Referenced by isMonochromeEnabled(), and setMonochromeEnabled().
|
protected |
Definition at line 464 of file renderbackend.h.
Referenced by FIFE::RenderBackendOpenGL::createImage(), getPixelFormat(), FIFE::RenderBackendSDL::setScreenMode(), and FIFE::RenderBackendOpenGL::setScreenMode().
|
protected |
Definition at line 455 of file renderbackend.h.
Referenced by FIFE::RenderBackendSDL::captureScreen(), FIFE::RenderBackendSDL::clearBackBuffer(), FIFE::RenderBackendSDL::detachRenderTarget(), FIFE::RenderBackendOpenGL::detachRenderTarget(), FIFE::RenderBackendSDL::endFrame(), getArea(), getHeight(), getWidth(), FIFE::RenderBackendSDL::setScreenMode(), and FIFE::RenderBackendOpenGL::setScreenMode().
|
protected |
Definition at line 463 of file renderbackend.h.
Referenced by getCurrentScreenMode(), FIFE::RenderBackendSDL::setScreenMode(), and FIFE::RenderBackendOpenGL::setScreenMode().
|
protected |
Definition at line 456 of file renderbackend.h.
Referenced by FIFE::RenderBackendSDL::attachRenderTarget(), FIFE::RenderBackendOpenGL::attachRenderTarget(), FIFE::RenderBackendSDL::detachRenderTarget(), FIFE::RenderBackendOpenGL::detachRenderTarget(), FIFE::RenderBackendSDL::fillRectangle(), getRenderTargetSurface(), FIFE::RenderBackendSDL::putPixel(), FIFE::RenderBackendOpenGL::putPixel(), FIFE::RenderBackendSDL::setClipArea(), FIFE::RenderBackendSDL::setScreenMode(), and FIFE::RenderBackendOpenGL::setScreenMode().
|
protected |
Definition at line 472 of file renderbackend.h.
Referenced by getTextureFiltering(), FIFE::RenderBackendOpenGL::setScreenMode(), and setTextureFiltering().
|
protected |
Definition at line 458 of file renderbackend.h.
Referenced by FIFE::RenderBackendOpenGL::attachRenderTarget(), FIFE::RenderBackendOpenGL::detachRenderTarget(), isFramebufferEnabled(), setFramebufferEnabled(), FIFE::RenderBackendOpenGL::setScreenMode(), and FIFE::RenderBackendOpenGL::~RenderBackendOpenGL().
|
protected |
Definition at line 459 of file renderbackend.h.
Referenced by isNPOTEnabled(), and setNPOTEnabled().