I've made my own GUI system, and I wanted to use manual rendering.
So, to draw some triangles on the screen I've used SceneManager::manualRender().
But look at the parameters :
Code: Select all
void SceneManager::manualRender(RenderOperation* rend,
Pass* pass, Viewport* vp, const Matrix4& worldMatrix,
const Matrix4& viewMatrix, const Matrix4& projMatrix,
bool doBeginEndFrame)
{
// ...
}I need to call this function several times with the same viewport and the same matrices, so it is a waste of time to set them back every time I need to render something (for the viewport, it's not a big deal because Ogre checks if the change is necessary, but not for the matrices).
Solution : you could write a version where these arguments are optional, and when they are not provided, use "default" ones (those that were set before calling the function).

