Skip to content
libRocket's RenderInterface implemented with Magnum
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LoadImage @ c2c8d89
src
.gitmodules
LICENSE
README.md

README.md

Magnum-libRocket

Rendering integration with libRocket via Magnum.

Usage

Usage is quite simple and straight-foward, you simply:

  • Create an object of mlr::RenderInterface
  • Set the shader for the render interface (via ctor or mlr::RenderInterface::setShader)
    • Note this shader must have texturing.
  • Set the size (typically the size of your window), via mlr::RenderInterface::setSize.
  • Register it to libRocket, via Rocket::Core::SetRenderInteface.

Dependencies

This requires my image loader library, alternatively instead of getting my library, you can write your own code to load images for libRocket. See LoadTexture within the RenderInterface.

Configuration

Configuration is can be done manually (obviously), or through a some macros:

Pre-processor Configuration

MLR_CUSTOM_SHADER

A flag to determine if we should be using a custom shader, if this flag is not defined, it is assumed we will use a Magnum::Shaders::Flat2D shader. You should declare the following macros (if you enable this macro):

MLR_CUSTOM_SHADER_PATh

The path for the definition of the shader. Note, this can't just be a class forward declaration, unless you include the appropriate file within RenderInterface.cpp.

MLR_CUSTOM_SHADER_NAME

The name of your custom shader class, e.g. CustomShader without the `'s.

License

See LICENSE.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.