Horde3D
http://www.horde3d.org/forums/

Enable / disable pipeline stage
http://www.horde3d.org/forums/viewtopic.php?f=2&t=2241
Page 1 of 1

Author:  72deluxe [ 14.01.2014, 18:08 ]
Post subject:  Enable / disable pipeline stage

Hello

I notice on the wiki regarding pipelines http://horde3d.org/wiki/index.php5?title=Basic_Pipeline_Tutorial that it says that you can enable or disable part of a pipeline stage using a horde3d function.

Which function is this? Does anyone have an example?

I see in the hdr.pipeline.xml that there are different stages. I have a few questions:
1. Are all the stages enabled by default?
2. They all refer to the same material but for different contexts, or in the case of the bloom stage, the same material and same context but different targets. Where do these targets come in? Where are they referenced elsewhere?

Thanks in advance
Rich

Author:  72deluxe [ 15.01.2014, 12:17 ]
Post subject:  Re: Enable / disable pipeline stage

Worry not about the second set of questions - more reading of the documentation has helped!

But the first question remains: How do you enable or disable part of a pipeline stage?

Thanks

Author:  72deluxe [ 15.01.2014, 13:26 ]
Post subject:  Re: Enable / disable pipeline stage

Discovered! More reading helped. Here is a sample to chuck out the names of the stages (where _pipeRes is the pipeline resource):
Code:
int stagecount = h3dGetResElemCount(_pipeRes, H3DPipeRes::StageElem);
for(int i=0; i<stagecount; ++i)
{
  std::cout << "Stage: " << h3dGetResParamStr(_pipeRes, H3DPipeRes::StageElem, i, H3DPipeRes::StageNameStr) << std::endl;
}


Here is how to disable a stage:
Code:
int index = h3dFindResElem(_pipeRes, H3DPipeRes::StageElem, H3DPipeRes::StageNameStr, "Bloom");
if(index != -1)
{
  h3dSetResParamI(_pipeRes, H3DPipeRes::StageElem, index, H3DPipeRes::StageActivationI, 0);
}

Author:  Volker [ 15.01.2014, 17:49 ]
Post subject:  Re: Enable / disable pipeline stage

Thanks for posting the answer, unfortunately this is not something to take for granted nowadays

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/