Page 1 of 1

[Feature Request] Renderer

Posted: Mon Sep 29, 2008 13:09
by Nitro
Hello,

Right now I am using a single effect file to render the whole gui. Sometimes it was nice if I could specify different effects (mainly pixel shaders) for different windows.
I'm using a custom renderer and the addQuad methods do not have a parameter which tell the window from which this quad originated. If there was such a parameter, I could do something like

Code: Select all

void addQuad( ..., Window* window)
{
    effect = lookup_effect( window->GetName() );
}


Doesn't have to be a Window*, could also be some kind of id or void* or whatever.

What do you think? Or will this already covered by the RenderTargets feature?

Posted: Tue Sep 30, 2008 18:09
by Jamarr
Is it not feasible to subscribe to each Window's EventRenderingEnded, or EventRenderingStarted, events and call the pixel shading code from within your callback?

I've not used these events myself, nor do I have much experience with pixel shading, but this would seem like a reasonable solution given my limited knowledge.

Posted: Mon Oct 06, 2008 09:00
by CrazyEddie
Hi,

The rendering systems updates should indeed allow a user to hook into the rendering process at the level of what we will call a 'managed' window. A managed window is basically a movable area that can be rendered to, any CEGUI window/widget will be able to be 'promoted' to become a managed window, thus allowing any window/widget to be affected by various effects.

The various effects will be things such as affecting the raw geometry prior to getting sent for rendering, as well as the ability to specify shaders and what have you. (In fact the system is basically some callbacks, so you can affect things however you want in those callbacks).

This low-level access will be renderer specific - so guys wanting to support multiple CEGUI renderers will need to supply >1 implementation.

Just to add that I know progress on this is painfully non-existent at the moment. I will get back to it just as soon as I have the time required to do the job properly. Sorry :oops:

CE.