[SOLVED] How to get some notification on compositor pass

Problems building or running the engine, queries about how to use features etc.
Post Reply
BAntDit
Kobold
Posts: 32
Joined: Mon Oct 27, 2014 5:43 pm
x 2

[SOLVED] How to get some notification on compositor pass

Post by BAntDit »

Hi,
I have complex renderer and using compositor script like that:

Code: Select all

compositor SomeCompositor
{
    technique
    {
        compositor_logic SomeLogic

        texture output_tex target_width target_height PF_FLOAT32_R no_fsaa chain_scope

        target output_tex
        {
            input none

            pass clear
            {
            }

            shadows off

            pass render_scene 
            {
                identifier 52

                first_render_queue 29
                last_render_queue 31
            }

            pass render_scene
            {
                identifier 42

                first_render_queue 59
                last_render_queue 61
            }
        }

        target_output
        {
            input none

            pass render_quad
            {
                identifier 101

                material Core/Post/DebugView

                input 0 output_tex 
            }
        }
    }
}
The problems is that i need some notification on start render_scene passes. Is there any way to get that notification?

Ogre::CompositorInstance::Listener does not help me because it make possible to take notification on operation involving material, but it's suit only for render_quad passes.

---
What i actually need to do:

I have my custom QueuedRenderable Visitor class derived from DefaultQueuedRenderable Visitor i need to use my own visitor for Ogre::RENDER_QUEUE_6. How can i take notification before pass that renders groups 59-61 to call
mSceneManager-> setQueuedRenderablVisitor (сustomQueuedRenderablVisitor);
and after that pass to call mSceneManager-> setQueuedRenderablVisitor (nullptr); to return default visitor.

----
P.S. Why this forum does not allow to type "set Queued Renderable Visitor" in one word ? )))
Last edited by BAntDit on Thu Jun 02, 2016 9:36 am, edited 1 time in total.
BAntDit
Kobold
Posts: 32
Joined: Mon Oct 27, 2014 5:43 pm
x 2

Re: [1.10] How to get some notification on compositor pass

Post by BAntDit »

I've found solution.
I created my own RenderQueueListener and override methods renderQueueEnded and renderQueueStarted:
void RenderQueueListener::renderQueueEnded(Ogre::uint8 queueGroupId, const Ogre::String &invocation,
bool &repeatThisInvocation)
{
if (queueGroupId == Ogre::RENDER_QUEUE_6)
mSceneManager->setQueuedRenderable Visitor(nullptr);
}

void RenderQueueListener::renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String &invocation,
bool &skipThisInvocation)
{
if (queueGroupId == Ogre::RENDER_QUEUE_6)
mSceneManager->setQueuedRenderable Visitor(&mOccludeeQueuedRenderable Visitor);
}
frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 65

Re: [SOLVED] How to get some notification on compositor pass

Post by frostbyte »

setQueuedRenderable+visitor= BRAND NAME
wow- thats cool (-:

must be some kind of faulty spammer protection forum plugin...
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos
Post Reply