Horde3D

Next-Generation Graphics Engine
It is currently 24.11.2024, 08:04

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 14.01.2014, 18:08 
Offline

Joined: 01.11.2013, 11:39
Posts: 14
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


Top
 Profile  
Reply with quote  
PostPosted: 15.01.2014, 12:17 
Offline

Joined: 01.11.2013, 11:39
Posts: 14
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


Top
 Profile  
Reply with quote  
PostPosted: 15.01.2014, 13:26 
Offline

Joined: 01.11.2013, 11:39
Posts: 14
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);
}


Top
 Profile  
Reply with quote  
PostPosted: 15.01.2014, 17:49 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Thanks for posting the answer, unfortunately this is not something to take for granted nowadays


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group