22 #ifndef FIFE_GUI_LIBROCKETRENDERINTERFACE_H 23 #define FIFE_GUI_LIBROCKETRENDERINTERFACE_H 31 #include <Rocket/Core/RenderInterface.h> 62 virtual void RenderGeometry(Rocket::Core::Vertex* vertices,
int num_vertices,
int* indices,
int num_indices, Rocket::Core::TextureHandle texture,
const Rocket::Core::Vector2f& translation);
66 virtual Rocket::Core::CompiledGeometryHandle
CompileGeometry(Rocket::Core::Vertex* vertices,
int num_vertices,
int* indices,
int num_indices, Rocket::Core::TextureHandle texture);
70 virtual void RenderCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry,
const Rocket::Core::Vector2f& translation);
86 virtual bool LoadTexture(Rocket::Core::TextureHandle& texture_handle, Rocket::Core::Vector2i& texture_dimensions,
const Rocket::Core::String& source);
90 virtual bool GenerateTexture(Rocket::Core::TextureHandle& texture_handle,
const Rocket::Core::byte* source,
const Rocket::Core::Vector2i& source_dimensions);
94 virtual void ReleaseTexture(Rocket::Core::TextureHandle texture_handle);
127 enableScissorTest(false),
128 hasScissorArea(false)
145 #endif // FIFE_GUI_LIBROCKETRENDERINTERFACE_H std::queue< GeometryCallData > GeometryCallDataChain
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 pixe...
Abstract interface for all the renderbackends.
RenderBackend * m_renderBackend
virtual void ReleaseCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry)
Called by Rocket when it wants to release application-compiled geometry.
virtual void RenderCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry, const Rocket::Core::Vector2f &translation)
Called by Rocket when it wants to render application-compiled geometry.
virtual void ReleaseTexture(Rocket::Core::TextureHandle texture_handle)
Called by Rocket when a loaded texture is no longer required.
virtual void SetScissorRegion(int x, int y, int width, int height)
Called by Rocket when it wants to change the scissor region.
std::size_t ResourceHandle
std::list< ResourceHandle > m_freedTextures
void freeTextures()
Frees all textures that are no longer needed by librocket.
GeometryCallDataChain callChain
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 futu...
ImageManager * m_imageManager
virtual void EnableScissorRegion(bool enable)
Called by Rocket when it wants to enable or disable scissoring to clip content.
std::vector< GuiVertex > vertices
virtual ~LibRocketRenderInterface()
Destructor.
std::queue< GeometryCall > m_geometryCalls
std::vector< int > indices
ResourceHandle textureHandle
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.
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.
void render()
Renders librocket gui.
LibRocketRenderInterface()
Constructor.