FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
#include <librocketrenderinterface.h>
Inherits RenderInterface.
Classes | |
class | GeometryCall |
class | GeometryCallData |
Public Member Functions | |
LibRocketRenderInterface () | |
Constructor. More... | |
virtual | ~LibRocketRenderInterface () |
Destructor. More... | |
virtual void | RenderGeometry (Rocket::Core::Vertex *vertices, int num_vertices, int *indices, int num_indices, Rocket::Core::TextureHandle texture, const Rocket::Core::Vector2f &translation) |
Called by Rocket when it wants to render geometry that it does not wish to optimise. More... | |
virtual Rocket::Core::CompiledGeometryHandle | CompileGeometry (Rocket::Core::Vertex *vertices, int num_vertices, int *indices, int num_indices, Rocket::Core::TextureHandle texture) |
Called by Rocket when it wants to compile geometry it believes will be static for the forseeable future. More... | |
virtual void | RenderCompiledGeometry (Rocket::Core::CompiledGeometryHandle geometry, const Rocket::Core::Vector2f &translation) |
Called by Rocket when it wants to render application-compiled geometry. More... | |
virtual void | ReleaseCompiledGeometry (Rocket::Core::CompiledGeometryHandle geometry) |
Called by Rocket when it wants to release application-compiled geometry. More... | |
virtual void | EnableScissorRegion (bool enable) |
Called by Rocket when it wants to enable or disable scissoring to clip content. More... | |
virtual void | SetScissorRegion (int x, int y, int width, int height) |
Called by Rocket when it wants to change the scissor region. More... | |
virtual bool | LoadTexture (Rocket::Core::TextureHandle &texture_handle, Rocket::Core::Vector2i &texture_dimensions, const Rocket::Core::String &source) |
Called by Rocket when a texture is required by the library. More... | |
virtual bool | GenerateTexture (Rocket::Core::TextureHandle &texture_handle, const Rocket::Core::byte *source, const Rocket::Core::Vector2i &source_dimensions) |
Called by Rocket when a texture is required to be built from an internally-generated sequence of pixels. More... | |
virtual void | ReleaseTexture (Rocket::Core::TextureHandle texture_handle) |
Called by Rocket when a loaded texture is no longer required. More... | |
void | render () |
Renders librocket gui. More... | |
void | freeTextures () |
Frees all textures that are no longer needed by librocket. More... | |
Private Types | |
typedef std::queue< GeometryCallData > | GeometryCallDataChain |
Private Attributes | |
RenderBackend * | m_renderBackend |
ImageManager * | m_imageManager |
std::queue< GeometryCall > | m_geometryCalls |
std::list< ResourceHandle > | m_freedTextures |
Definition at line 49 of file librocketrenderinterface.h.
|
private |
Definition at line 120 of file librocketrenderinterface.h.
FIFE::LibRocketRenderInterface::LibRocketRenderInterface | ( | ) |
Constructor.
Definition at line 37 of file librocketrenderinterface.cpp.
|
virtual |
|
virtual |
Called by Rocket when it wants to compile geometry it believes will be static for the forseeable future.
Definition at line 82 of file librocketrenderinterface.cpp.
|
virtual |
Called by Rocket when it wants to enable or disable scissoring to clip content.
Definition at line 92 of file librocketrenderinterface.cpp.
References FIFE::LibRocketRenderInterface::GeometryCall::enableScissorTest, FIFE::LibRocketRenderInterface::GeometryCall::hasScissorArea, m_geometryCalls, and FIFE::LibRocketRenderInterface::GeometryCall::scissorArea.
void FIFE::LibRocketRenderInterface::freeTextures | ( | ) |
Frees all textures that are no longer needed by librocket.
Definition at line 192 of file librocketrenderinterface.cpp.
References FIFE::Image::free(), FIFE::ImageManager::get(), m_freedTextures, and m_imageManager.
Referenced by FIFE::LibRocketManager::turn(), and ~LibRocketRenderInterface().
|
virtual |
Called by Rocket when a texture is required to be built from an internally-generated sequence of pixels.
Definition at line 141 of file librocketrenderinterface.cpp.
References FIFE::ImageManager::add(), FIFE::RenderBackend::createImage(), FIFE::IResource::getHandle(), m_imageManager, m_renderBackend, FIFE::IResource::RES_LOADED, and FIFE::IResource::setState().
|
virtual |
Called by Rocket when a texture is required by the library.
Definition at line 126 of file librocketrenderinterface.cpp.
References FIFE::ImageManager::exists(), FIFE::ImageManager::get(), FIFE::Image::getWidth(), FIFE::ImageManager::load(), and m_imageManager.
|
virtual |
Called by Rocket when it wants to release application-compiled geometry.
Definition at line 89 of file librocketrenderinterface.cpp.
|
virtual |
Called by Rocket when a loaded texture is no longer required.
Definition at line 153 of file librocketrenderinterface.cpp.
References m_freedTextures.
void FIFE::LibRocketRenderInterface::render | ( | ) |
Renders librocket gui.
Definition at line 159 of file librocketrenderinterface.cpp.
References FIFE::LibRocketRenderInterface::GeometryCall::callChain, FIFE::RenderBackend::disableScissorTest(), FIFE::LibRocketRenderInterface::GeometryCall::enableScissorTest, FIFE::RenderBackend::enableScissorTest(), FIFE::ImageManager::get(), FIFE::LibRocketRenderInterface::GeometryCall::hasScissorArea, FIFE::LibRocketRenderInterface::GeometryCallData::indices, m_geometryCalls, m_imageManager, m_renderBackend, FIFE::RenderBackend::popClipArea(), FIFE::RenderBackend::pushClipArea(), FIFE::RenderBackend::renderGuiGeometry(), FIFE::LibRocketRenderInterface::GeometryCall::scissorArea, FIFE::LibRocketRenderInterface::GeometryCallData::textureHandle, FIFE::LibRocketRenderInterface::GeometryCallData::translation, and FIFE::LibRocketRenderInterface::GeometryCallData::vertices.
Referenced by FIFE::LibRocketManager::turn().
|
virtual |
Called by Rocket when it wants to render application-compiled geometry.
Definition at line 86 of file librocketrenderinterface.cpp.
|
virtual |
Called by Rocket when it wants to render geometry that it does not wish to optimise.
Definition at line 47 of file librocketrenderinterface.cpp.
References FIFE::LibRocketRenderInterface::GeometryCall::callChain, FIFE::GuiVertex::color, FIFE::LibRocketRenderInterface::GeometryCallData::indices, m_geometryCalls, FIFE::GuiVertex::position, FIFE::Color::set(), FIFE::PointType2D< T >::set(), FIFE::GuiVertex::texCoords, FIFE::LibRocketRenderInterface::GeometryCallData::textureHandle, FIFE::LibRocketRenderInterface::GeometryCallData::translation, and FIFE::LibRocketRenderInterface::GeometryCallData::vertices.
|
virtual |
Called by Rocket when it wants to change the scissor region.
Definition at line 110 of file librocketrenderinterface.cpp.
References FIFE::LibRocketRenderInterface::GeometryCall::enableScissorTest, FIFE::LibRocketRenderInterface::GeometryCall::hasScissorArea, m_geometryCalls, and FIFE::LibRocketRenderInterface::GeometryCall::scissorArea.
|
private |
Definition at line 140 of file librocketrenderinterface.h.
Referenced by freeTextures(), and ReleaseTexture().
|
private |
Definition at line 138 of file librocketrenderinterface.h.
Referenced by EnableScissorRegion(), render(), RenderGeometry(), and SetScissorRegion().
|
private |
Definition at line 110 of file librocketrenderinterface.h.
Referenced by freeTextures(), GenerateTexture(), LoadTexture(), and render().
|
private |
Definition at line 108 of file librocketrenderinterface.h.
Referenced by GenerateTexture(), and render().