FIFE
|
The main class of the OpenGL-based experimental renderer. More...
#include <renderbackendopengle.h>
Classes | |
struct | currentState |
struct | RenderData |
class | RenderObject |
struct | RenderZData |
struct | RenderZData2T |
struct | RenderZObject |
Public Member Functions | |
RenderBackendOpenGLe (const SDL_Color &colorkey) | |
virtual | ~RenderBackendOpenGLe () |
virtual const std::string & | getName () const |
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) |
Initializes the backend. More... | |
virtual void | clearBackBuffer () |
Forces a clear of the backbuffer. More... | |
virtual void | setLightingModel (uint32_t lighting) |
Initializes the light. More... | |
virtual uint32_t | getLightingModel () const |
Gets the current light model. More... | |
virtual void | setLighting (float red, float green, float blue) |
Set colors for lighting. More... | |
virtual void | resetLighting () |
Reset lighting with default values. More... | |
virtual void | resetStencilBuffer (uint8_t buffer) |
Reset stencil buffer with given value. More... | |
virtual void | changeBlending (int32_t scr, int32_t dst) |
Change the Blendingmodel. More... | |
virtual void | createMainScreen (const ScreenMode &mode, const std::string &title, const std::string &icon) |
Creates the mainscreen (the display window). More... | |
virtual void | setScreenMode (const ScreenMode &mode) |
Sets the mainscreen display mode. More... | |
virtual Image * | createImage (IResourceLoader *loader=0) |
virtual Image * | createImage (const std::string &name, IResourceLoader *loader=0) |
virtual Image * | createImage (const uint8_t *data, uint32_t width, uint32_t height) |
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) |
virtual Image * | createImage (SDL_Surface *surface) |
Helper function to create images from SDL_Surfaces. More... | |
virtual Image * | createImage (const std::string &name, SDL_Surface *surface) |
virtual void | renderVertexArrays () |
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) |
Add the Image data to the array. More... | |
virtual void | addImageToArrayZ (uint32_t id, const Rect &rec, float vertexZ, float const *st, uint8_t alpha, bool forceNewBatch, uint8_t const *rgba) |
virtual void | changeRenderInfos (uint16_t elements, int32_t src, int32_t dst, bool light, bool stentest, uint8_t stenref, GLConstants stenop, GLConstants stenfunc) |
Dirty helper function to change the render infos. More... | |
virtual void | captureScreen (const std::string &filename) |
Creates a Screenshot and saves it to a file. More... | |
virtual void | captureScreen (const std::string &filename, uint32_t width, uint32_t height) |
Creates a Screenshot with the given size(w,h) and saves it to a file. More... | |
virtual bool | putPixel (int32_t x, int32_t y, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255) |
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) |
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) |
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) |
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) |
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) |
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) |
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) |
Draws a light primitive that based on a triangle fan. More... | |
virtual void | attachRenderTarget (ImagePtr &img, bool discard) |
Attaches given image as a new render surface. More... | |
virtual void | detachRenderTarget () |
Detaches current render surface. More... | |
void | enableTextures (uint32_t texUnit) |
void | disableTextures (uint32_t texUnit) |
void | bindTexture (uint32_t texUnit, GLuint texId) |
void | bindTexture (GLuint textId) |
![]() | |
RenderBackend (const SDL_Color &colorkey) | |
Constructor. More... | |
virtual | ~RenderBackend () |
Destructor. More... | |
void | deinit () |
Performs cleanup actions. 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... | |
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 | 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... | |
![]() | |
DynamicSingleton () | |
virtual | ~DynamicSingleton () |
Static Public Attributes | |
static const float | zfar = 100.0f |
static const float | znear = -100.0f |
Protected Member Functions | |
virtual void | setClipArea (const Rect &cliparea, bool clear) |
Sets given clip area into image. More... | |
void | enableLighting () |
void | disableLighting () |
void | enableStencilTest () |
void | disableStencilTest () |
void | setStencilTest (uint8_t stencil_ref, GLenum stencil_op, GLenum stencil_func) |
void | enableAlphaTest () |
void | disableAlphaTest () |
void | setAlphaTest (float ref_alpha) |
void | enableDepthTest () |
void | disableDepthTest () |
void | setEnvironmentalColor (const uint8_t *rgba) |
void | setVertexPointer (GLsizei stride, const GLvoid *ptr) |
void | setColorPointer (GLsizei stride, const GLvoid *ptr) |
void | setTexCoordPointer (uint32_t texUnit, GLsizei stride, const GLvoid *ptr) |
void | enableScissorTest () |
void | disableScissorTest () |
void | renderWithZ () |
void | renderWithoutZ () |
void | prepareForOverlays () |
RenderZObject * | getRenderBufferObject (GLuint texture_id, bool unlit=false) |
![]() | |
void | clearClipArea () |
Clears any possible clip areas. More... | |
Protected Attributes | |
GLuint | m_mask_overlays |
std::vector< RenderZData > | m_renderZ_datas |
std::vector< RenderZObject > | m_renderZ_objects |
std::vector< RenderZData2T > | m_render_trans_datas |
std::vector< RenderObject > | m_render_trans_objects |
std::vector< RenderZData2T > | m_render_datas2T |
std::vector< RenderObject > | m_render_objects2T |
std::vector< RenderZObject > | m_renderZ_objects_forced |
std::vector< RenderData > | m_render_datas |
std::vector< RenderObject > | m_render_objects |
struct FIFE::RenderBackendOpenGLe::currentState | m_state |
GLuint | m_fbo_id |
ImagePtr | m_img_target |
bool | m_target_discard |
![]() | |
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 |
std::stack< ClipInfo > | m_clipstack |
Additional Inherited Members | |
![]() | |
static RenderBackend * | instance () |
The main class of the OpenGL-based experimental renderer.
Definition at line 42 of file renderbackendopengle.h.
FIFE::RenderBackendOpenGLe::RenderBackendOpenGLe | ( | const SDL_Color & | colorkey | ) |
Definition at line 83 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::active_tex, FIFE::RenderBackendOpenGLe::currentState::alpha_enabled, FIFE::RenderBackendOpenGLe::currentState::blend_dst, FIFE::RenderBackendOpenGLe::currentState::blend_src, FIFE::RenderBackendOpenGLe::currentState::depth_enabled, FIFE::RenderBackendOpenGLe::currentState::env_color, FIFE::RenderBackendOpenGLe::currentState::light_enabled, FIFE::RenderBackendOpenGLe::currentState::lightmodel, m_state, FIFE::RenderBackendOpenGLe::currentState::scissor_test, FIFE::RenderBackendOpenGLe::currentState::sten_buf, FIFE::RenderBackendOpenGLe::currentState::sten_enabled, FIFE::RenderBackendOpenGLe::currentState::sten_func, FIFE::RenderBackendOpenGLe::currentState::sten_op, FIFE::RenderBackendOpenGLe::currentState::sten_ref, FIFE::RenderBackendOpenGLe::currentState::tex_enabled, and FIFE::RenderBackendOpenGLe::currentState::texture.
|
virtual |
Definition at line 112 of file renderbackendopengle.cpp.
References FIFE::RenderBackend::deinit(), m_fbo_id, m_mask_overlays, and FIFE::RenderBackend::m_useframebuffer.
|
virtual |
Add the Image data to the array.
Implements FIFE::RenderBackend.
Definition at line 1057 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::RenderData::color, FIFE::RectType< T >::h, m_render_datas, m_render_objects, FIFE::RenderBackendOpenGLe::RenderData::texel, FIFE::RenderBackendOpenGLe::RenderData::vertex, FIFE::RectType< T >::w, FIFE::RectType< T >::x, and FIFE::RectType< T >::y.
Referenced by attachRenderTarget().
|
virtual |
Definition at line 1123 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::RenderZData2T::color, FIFE::RenderBackendOpenGLe::RenderZObject::elements, getRenderBufferObject(), FIFE::RectType< T >::h, FIFE::RenderBackendOpenGLe::RenderZObject::index, m_render_datas2T, m_render_objects2T, m_render_trans_datas, m_render_trans_objects, m_renderZ_datas, FIFE::RenderBackendOpenGLe::RenderObject::rgba, FIFE::RenderBackendOpenGLe::RenderZData::texel, FIFE::RenderBackendOpenGLe::RenderZData2T::texel, FIFE::RenderBackendOpenGLe::RenderZData2T::texel2, FIFE::RenderBackendOpenGLe::RenderZData::vertex, FIFE::RenderBackendOpenGLe::RenderZData2T::vertex, FIFE::RectType< T >::w, FIFE::RectType< T >::x, and FIFE::RectType< T >::y.
|
virtual |
Attaches given image as a new render surface.
Implements FIFE::RenderBackend.
Definition at line 1454 of file renderbackendopengle.cpp.
References addImageToArray(), bindTexture(), FIFE::Image::forceLoadInternal(), FIFE::SharedPtr< T >::get(), FIFE::Image::getArea(), FIFE::Image::getHeight(), FIFE::Image::getSurface(), FIFE::GLeImage::getTexId(), FIFE::Image::getWidth(), FIFE::GLeImage::isCompressed(), m_fbo_id, m_img_target, FIFE::RenderBackend::m_target, m_target_discard, FIFE::RenderBackend::m_useframebuffer, renderVertexArrays(), renderWithoutZ(), and FIFE::GLeImage::setCompressed().
void FIFE::RenderBackendOpenGLe::bindTexture | ( | uint32_t | texUnit, |
GLuint | texId | ||
) |
Definition at line 382 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::active_tex, enableTextures(), m_state, and FIFE::RenderBackendOpenGLe::currentState::texture.
Referenced by attachRenderTarget(), detachRenderTarget(), renderWithoutZ(), and renderWithZ().
void FIFE::RenderBackendOpenGLe::bindTexture | ( | GLuint | textId | ) |
Definition at line 395 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::active_tex, m_state, and FIFE::RenderBackendOpenGLe::currentState::texture.
|
virtual |
Creates a Screenshot and saves it to a file.
Implements FIFE::RenderBackend.
Definition at line 1295 of file renderbackendopengle.cpp.
References FIFE::BMASK, FIFE::RenderBackend::getHeight(), FIFE::RenderBackend::getWidth(), FIFE::GMASK, FIFE::NULLMASK, FIFE::RMASK, and FIFE::Image::saveAsPng().
Referenced by captureScreen().
|
virtual |
Creates a Screenshot with the given size(w,h) and saves it to a file.
Implements FIFE::RenderBackend.
Definition at line 1329 of file renderbackendopengle.cpp.
References FIFE::AMASK, FIFE::BMASK, captureScreen(), FIFE::RenderBackend::getHeight(), FIFE::RenderBackend::getWidth(), FIFE::GMASK, FIFE::RMASK, and FIFE::Image::saveAsPng().
|
virtual |
Change the Blendingmodel.
Implements FIFE::RenderBackend.
Definition at line 526 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::blend_dst, FIFE::RenderBackendOpenGLe::currentState::blend_src, and m_state.
Referenced by renderWithoutZ().
|
virtual |
Dirty helper function to change the render infos.
Implements FIFE::RenderBackend.
Definition at line 563 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::RenderObject::dst, FIFE::RenderBackendOpenGLe::RenderObject::light, m_render_objects, FIFE::RenderBackendOpenGLe::RenderObject::src, FIFE::RenderBackendOpenGLe::RenderObject::stencil_func, FIFE::RenderBackendOpenGLe::RenderObject::stencil_op, FIFE::RenderBackendOpenGLe::RenderObject::stencil_ref, and FIFE::RenderBackendOpenGLe::RenderObject::stencil_test.
|
virtual |
Forces a clear of the backbuffer.
Implements FIFE::RenderBackend.
Definition at line 136 of file renderbackendopengle.cpp.
References disableScissorTest(), and enableScissorTest().
|
virtual |
Implements FIFE::RenderBackend.
Definition at line 247 of file renderbackendopengle.cpp.
|
virtual |
Implements FIFE::RenderBackend.
Definition at line 251 of file renderbackendopengle.cpp.
|
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. |
Implements FIFE::RenderBackend.
Definition at line 323 of file renderbackendopengle.cpp.
|
virtual |
Implements FIFE::RenderBackend.
Definition at line 327 of file renderbackendopengle.cpp.
|
virtual |
Helper function to create images from SDL_Surfaces.
Takes ownership over the surface.
surface | The surface to convert. |
Implements FIFE::RenderBackend.
Definition at line 255 of file renderbackendopengle.cpp.
References FIFE::RenderBackend::m_rgba_format.
|
virtual |
Implements FIFE::RenderBackend.
Definition at line 289 of file renderbackendopengle.cpp.
References FIFE::RenderBackend::m_rgba_format.
|
virtual |
Creates the mainscreen (the display window).
mode | The ScreenMode to use. |
title | The window title to use. |
icon | The window icon to use. |
Implements FIFE::RenderBackend.
Definition at line 142 of file renderbackendopengle.cpp.
References setScreenMode().
|
virtual |
Detaches current render surface.
Implements FIFE::RenderBackend.
Definition at line 1509 of file renderbackendopengle.cpp.
References bindTexture(), FIFE::SharedPtr< T >::get(), FIFE::Image::getHeight(), FIFE::Image::getWidth(), m_img_target, FIFE::RenderBackend::m_screen, FIFE::RenderBackend::m_target, FIFE::RenderBackend::m_useframebuffer, renderVertexArrays(), zfar, and znear.
|
protected |
Definition at line 472 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::alpha_enabled, and m_state.
Referenced by renderWithoutZ(), and renderWithZ().
|
protected |
Definition at line 491 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::depth_enabled, and m_state.
Referenced by renderWithoutZ(), and renderWithZ().
|
protected |
Definition at line 409 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::light_enabled, FIFE::RenderBackendOpenGLe::currentState::lightmodel, and m_state.
Referenced by renderWithZ(), and setLightingModel().
|
protected |
Definition at line 519 of file renderbackendopengle.cpp.
References m_state, and FIFE::RenderBackendOpenGLe::currentState::scissor_test.
Referenced by clearBackBuffer(), and resetStencilBuffer().
|
protected |
Definition at line 434 of file renderbackendopengle.cpp.
References m_state, and FIFE::RenderBackendOpenGLe::currentState::sten_enabled.
Referenced by renderWithoutZ(), and renderWithZ().
void FIFE::RenderBackendOpenGLe::disableTextures | ( | uint32_t | texUnit | ) |
Definition at line 366 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::active_tex, m_state, and FIFE::RenderBackendOpenGLe::currentState::tex_enabled.
Referenced by renderWithoutZ(), and renderWithZ().
|
virtual |
Draws a light primitive that based on a triangle fan.
Implements FIFE::RenderBackend.
Definition at line 1027 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::RenderData::color, FIFE::Math< T >::Cos(), m_render_datas, m_render_objects, FIFE::Math< T >::Sin(), FIFE::Math< T >::twoPi(), FIFE::RenderBackendOpenGLe::RenderData::vertex, FIFE::PointType2D< T >::x, and FIFE::PointType2D< T >::y.
|
virtual |
Draws line between given points with given RGBA.
Implements FIFE::RenderBackend.
Definition at line 893 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::RenderData::color, m_render_datas, m_render_objects, FIFE::RenderBackendOpenGLe::RenderData::vertex, FIFE::PointType2D< T >::x, and FIFE::PointType2D< T >::y.
Referenced by FIFE::OpenGLeGuiGraphics::drawLine().
|
virtual |
Draws quad between given points with given RGBA.
Implements FIFE::RenderBackend.
Definition at line 978 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::RenderData::color, m_render_datas, m_render_objects, FIFE::RenderBackendOpenGLe::RenderData::vertex, FIFE::PointType2D< T >::x, and FIFE::PointType2D< T >::y.
|
virtual |
Draws an axis parallel rectangle.
Implements FIFE::RenderBackend.
Definition at line 933 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::RenderData::color, m_render_datas, m_render_objects, FIFE::RenderBackendOpenGLe::RenderData::vertex, FIFE::PointType2D< T >::x, and FIFE::PointType2D< T >::y.
Referenced by FIFE::OpenGLeGuiGraphics::drawRectangle().
|
virtual |
Draws triangle between given points with given RGBA.
Implements FIFE::RenderBackend.
Definition at line 911 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::RenderData::color, m_render_datas, m_render_objects, FIFE::RenderBackendOpenGLe::RenderData::vertex, FIFE::PointType2D< T >::x, and FIFE::PointType2D< T >::y.
|
virtual |
Draws a quad that represents a vertex with given RGBA.
Implements FIFE::RenderBackend.
Definition at line 1004 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::RenderData::color, m_render_datas, m_render_objects, FIFE::RenderBackendOpenGLe::RenderData::vertex, FIFE::PointType2D< T >::x, and FIFE::PointType2D< T >::y.
|
protected |
Definition at line 465 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::alpha_enabled, and m_state.
Referenced by renderWithoutZ(), renderWithZ(), and setAlphaTest().
|
protected |
Definition at line 484 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::depth_enabled, and m_state.
Referenced by renderWithZ().
|
protected |
Definition at line 402 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::light_enabled, FIFE::RenderBackendOpenGLe::currentState::lightmodel, and m_state.
Referenced by renderWithZ(), and setLightingModel().
|
protected |
Definition at line 512 of file renderbackendopengle.cpp.
References m_state, and FIFE::RenderBackendOpenGLe::currentState::scissor_test.
Referenced by clearBackBuffer(), and resetStencilBuffer().
|
protected |
Definition at line 427 of file renderbackendopengle.cpp.
References m_state, and FIFE::RenderBackendOpenGLe::currentState::sten_enabled.
Referenced by setStencilTest().
void FIFE::RenderBackendOpenGLe::enableTextures | ( | uint32_t | texUnit | ) |
Definition at line 351 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::active_tex, m_state, and FIFE::RenderBackendOpenGLe::currentState::tex_enabled.
Referenced by bindTexture(), renderWithoutZ(), and renderWithZ().
|
virtual |
Called when a frame is finished and ready to be displayed.
Reimplemented from FIFE::RenderBackend.
Definition at line 242 of file renderbackendopengle.cpp.
References FIFE::RenderBackend::endFrame().
|
virtual |
Draws a filled axis parallel rectangle.
Implements FIFE::RenderBackend.
Definition at line 955 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::RenderData::color, m_render_datas, m_render_objects, FIFE::RenderBackendOpenGLe::RenderData::vertex, FIFE::PointType2D< T >::x, and FIFE::PointType2D< T >::y.
Referenced by FIFE::OpenGLeGuiGraphics::fillRectangle().
|
virtual |
Gets the current light model.
Implements FIFE::RenderBackend.
Definition at line 347 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::lightmodel, and m_state.
|
virtual |
The name of the renderbackend.
Implements FIFE::RenderBackend.
Definition at line 120 of file renderbackendopengle.cpp.
|
protected |
Definition at line 1088 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::RenderZObject::elements, FIFE::RenderBackendOpenGLe::RenderZObject::index, m_renderZ_objects, m_renderZ_objects_forced, FIFE::max_quads_per_texbatch, FIFE::RenderBackendOpenGLe::RenderZObject::max_size, and FIFE::RenderBackendOpenGLe::RenderZObject::texture_id.
Referenced by addImageToArrayZ().
|
virtual |
Initializes the backend.
Implements FIFE::RenderBackend.
Definition at line 125 of file renderbackendopengle.cpp.
|
protected |
Definition at line 1241 of file renderbackendopengle.cpp.
References m_mask_overlays, m_state, and FIFE::RenderBackendOpenGLe::currentState::texture.
Referenced by setScreenMode().
|
virtual |
Writes pixel to given position.
Returns true, if pixel was written (not out of bounds)
Implements FIFE::RenderBackend.
Definition at line 873 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::RenderData::color, m_render_datas, m_render_objects, FIFE::RenderBackend::m_target, and FIFE::RenderBackendOpenGLe::RenderData::vertex.
Referenced by FIFE::OpenGLeGuiGraphics::drawLine(), and FIFE::OpenGLeGuiGraphics::drawPoint().
|
virtual |
Render the Vertex Arrays, only for primitives (points, lines,...)
Implements FIFE::RenderBackend.
Definition at line 584 of file renderbackendopengle.cpp.
References m_render_objects, m_renderZ_objects, m_renderZ_objects_forced, renderWithoutZ(), and renderWithZ().
Referenced by FIFE::OpenGLeGuiGraphics::_endDraw(), attachRenderTarget(), detachRenderTarget(), FIFE::OpenGLeGuiGraphics::popClipArea(), and FIFE::OpenGLeGuiGraphics::pushClipArea().
|
protected |
Definition at line 744 of file renderbackendopengle.cpp.
References bindTexture(), changeBlending(), disableAlphaTest(), disableDepthTest(), disableStencilTest(), disableTextures(), enableAlphaTest(), enableTextures(), FIFE::RenderBackendOpenGLe::currentState::lightmodel, m_render_datas, m_render_objects, m_state, setStencilTest(), FIFE::RenderBackendOpenGLe::currentState::sten_enabled, FIFE::RenderBackendOpenGLe::currentState::sten_func, FIFE::RenderBackendOpenGLe::currentState::sten_op, and FIFE::RenderBackendOpenGLe::currentState::sten_ref.
Referenced by attachRenderTarget(), and renderVertexArrays().
|
protected |
Definition at line 603 of file renderbackendopengle.cpp.
References bindTexture(), disableAlphaTest(), disableDepthTest(), disableLighting(), disableStencilTest(), disableTextures(), enableAlphaTest(), enableDepthTest(), enableLighting(), enableTextures(), m_render_datas2T, m_render_objects2T, m_render_trans_datas, m_render_trans_objects, m_renderZ_datas, m_renderZ_objects, m_renderZ_objects_forced, setEnvironmentalColor(), and setStencilTest().
Referenced by renderVertexArrays().
|
virtual |
Reset lighting with default values.
Implements FIFE::RenderBackend.
Definition at line 423 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::light_enabled, and m_state.
|
virtual |
Reset stencil buffer with given value.
Implements FIFE::RenderBackend.
Definition at line 455 of file renderbackendopengle.cpp.
References disableScissorTest(), enableScissorTest(), m_state, and FIFE::RenderBackendOpenGLe::currentState::sten_buf.
|
protected |
Definition at line 479 of file renderbackendopengle.cpp.
References enableAlphaTest().
|
protectedvirtual |
Sets given clip area into image.
Implements FIFE::RenderBackend.
Definition at line 1440 of file renderbackendopengle.cpp.
References FIFE::RenderBackend::getHeight(), FIFE::RectType< T >::h, FIFE::RenderBackend::m_backgroundcolor, FIFE::RenderBackend::m_isbackgroundcolor, FIFE::RectType< T >::w, FIFE::RectType< T >::x, and FIFE::RectType< T >::y.
|
protected |
|
protected |
Definition at line 498 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::env_color, and m_state.
Referenced by renderWithZ().
|
virtual |
Set colors for lighting.
Implements FIFE::RenderBackend.
Definition at line 416 of file renderbackendopengle.cpp.
References FIFE::RenderBackendOpenGLe::currentState::lightmodel, and m_state.
|
virtual |
Initializes the light.
Implements FIFE::RenderBackend.
Definition at line 331 of file renderbackendopengle.cpp.
References disableLighting(), enableLighting(), FIFE::RenderBackendOpenGLe::currentState::lightmodel, and m_state.
|
virtual |
Sets the mainscreen display mode.
mode | The ScreenMode to change the display to. |
Implements FIFE::RenderBackend.
Definition at line 155 of file renderbackendopengle.cpp.
References ALPHA_REF, FIFE::AMASK, FIFE::BMASK, FIFE::buffer_default_size, FL_LOG, FIFE::ScreenMode::getBPP(), FIFE::ScreenMode::getHeight(), FIFE::ScreenMode::getSDLFlags(), FIFE::ScreenMode::getWidth(), FIFE::GMASK, m_fbo_id, m_renderZ_datas, FIFE::RenderBackend::m_rgba_format, FIFE::RenderBackend::m_screen, FIFE::RenderBackend::m_screenMode, FIFE::RenderBackend::m_target, FIFE::RenderBackend::m_useframebuffer, prepareForOverlays(), FIFE::RMASK, zfar, and znear.
Referenced by createMainScreen().
|
protected |
Definition at line 441 of file renderbackendopengle.cpp.
References enableStencilTest(), m_state, FIFE::RenderBackendOpenGLe::currentState::sten_func, FIFE::RenderBackendOpenGLe::currentState::sten_op, and FIFE::RenderBackendOpenGLe::currentState::sten_ref.
Referenced by renderWithoutZ(), and renderWithZ().
|
protected |
|
protected |
|
virtual |
Called when a new frame starts.
Reimplemented from FIFE::RenderBackend.
Definition at line 238 of file renderbackendopengle.cpp.
References FIFE::RenderBackend::startFrame().
|
protected |
Definition at line 199 of file renderbackendopengle.h.
Referenced by attachRenderTarget(), setScreenMode(), and ~RenderBackendOpenGLe().
|
protected |
Definition at line 200 of file renderbackendopengle.h.
Referenced by attachRenderTarget(), and detachRenderTarget().
|
protected |
Definition at line 118 of file renderbackendopengle.h.
Referenced by prepareForOverlays(), and ~RenderBackendOpenGLe().
|
protected |
Definition at line 169 of file renderbackendopengle.h.
Referenced by addImageToArray(), drawLightPrimitive(), drawLine(), drawQuad(), drawRectangle(), drawTriangle(), drawVertex(), fillRectangle(), putPixel(), and renderWithoutZ().
|
protected |
Definition at line 162 of file renderbackendopengle.h.
Referenced by addImageToArrayZ(), and renderWithZ().
|
protected |
Definition at line 170 of file renderbackendopengle.h.
Referenced by addImageToArray(), changeRenderInfos(), drawLightPrimitive(), drawLine(), drawQuad(), drawRectangle(), drawTriangle(), drawVertex(), fillRectangle(), putPixel(), renderVertexArrays(), and renderWithoutZ().
|
protected |
Definition at line 163 of file renderbackendopengle.h.
Referenced by addImageToArrayZ(), and renderWithZ().
|
protected |
Definition at line 158 of file renderbackendopengle.h.
Referenced by addImageToArrayZ(), and renderWithZ().
|
protected |
Definition at line 159 of file renderbackendopengle.h.
Referenced by addImageToArrayZ(), and renderWithZ().
|
protected |
Definition at line 154 of file renderbackendopengle.h.
Referenced by addImageToArrayZ(), renderWithZ(), and setScreenMode().
|
protected |
Definition at line 155 of file renderbackendopengle.h.
Referenced by getRenderBufferObject(), renderVertexArrays(), and renderWithZ().
|
protected |
Definition at line 166 of file renderbackendopengle.h.
Referenced by getRenderBufferObject(), renderVertexArrays(), and renderWithZ().
|
protected |
Referenced by bindTexture(), changeBlending(), disableAlphaTest(), disableDepthTest(), disableLighting(), disableScissorTest(), disableStencilTest(), disableTextures(), enableAlphaTest(), enableDepthTest(), enableLighting(), enableScissorTest(), enableStencilTest(), enableTextures(), getLightingModel(), prepareForOverlays(), RenderBackendOpenGLe(), renderWithoutZ(), resetLighting(), resetStencilBuffer(), setEnvironmentalColor(), setLighting(), setLightingModel(), and setStencilTest().
|
protected |
Definition at line 201 of file renderbackendopengle.h.
Referenced by attachRenderTarget().
|
static |
Definition at line 92 of file renderbackendopengle.h.
Referenced by detachRenderTarget(), and setScreenMode().
|
static |
Definition at line 93 of file renderbackendopengle.h.
Referenced by detachRenderTarget(), and setScreenMode().