Re: [osg-users] Pragmatic shader - a new #pragma directive proposition

2016-01-15 Thread Robert Milharcic
Hi Robert Osfield et. al., On 14.1.2016 16:34, Robert Osfield wrote: I'm still open to making the shader parsing extensible, it seems like an interesting experimental tool. As Sebastian already pointed out, the actual parsing can be done outside osg, perhaps before Shader::setShaderSource()

Re: [osg-users] Combine geodes

2016-01-15 Thread Artem Ivanov
Actually, I have some more questions about using stencil buffer: - how can I clear stencil buffer on render bin? (in OpenGL tutorials everyone uses glClear(GL_STENCIL_BUFFER_BIT) - is it possible to disable stencil buffer at the begining of the render bin and enable it at the end? Or should I

Re: [osg-users] Combine geodes

2016-01-15 Thread Robert Osfield
Hi Artem, The osgreflect example is rather basic and very old so doesn't illustrate the clear mask (it's one of our very first example programs.) The osg::Camera has support for controlling the OpenGL clearing, from include/osg/Camera header: /** Set the clear mask used in glClear().

Re: [osg-users] Guaranteeing a specific order of node callbacks?

2016-01-15 Thread Robert Osfield
Hi Christian, Callbacks are simply called in the order that visitor comes across them, it's depth first, left right by default for OSG's update traversal. There isn't any other controls for order like there is for the rendering back end. You can either enforce the ordering when you create your

[osg-users] Guaranteeing a specific order of node callbacks?

2016-01-15 Thread Christian Buchner
Hi, I have a couple of Geodes with an associated update callback, responsible for updating the nodes. Now due to a customer request there is a dependency between these Geodes, requiring a specific order in which these callbacks have to be executed. My geodes each render a 3-dimensional cylinder

Re: [osg-users] Pragmatic shader - a new #pragma directive proposition

2016-01-15 Thread Robert Milharcic
Hi Nick, On 14.1.2016 15:31, Trajce Nikolov NICK wrote: Hi Robert M. I went through this thread fast and I see you are trying (at least your show case) is lighting and use of shader composition. The approach you are taking is what I was using too, some years ago. But there are other methods

Re: [osg-users] Pragmatic shader - a new #pragma directive proposition

2016-01-15 Thread Robert Milharcic
Hi Sebastian, Hi Robert, Hi Sebastian , First of all, the lightning shader only illustrates one of the cases where (optionally) repeating a code block containing substitution parameter can be useful. I used the multi-light lightning as an illustration only. First, thank you for your

Re: [osg-users] Pragmatic shader - a new #pragma directive proposition

2016-01-15 Thread Trajce Nikolov NICK
> Frankly, I never thought about multi-light problem this way. I wonder if such technique can be generalized enough, e.g. hidden behind the scenes, so the user of the lighting framework doesn't have to deal with the texture objects That is what I though when designing OpenIG. Since I sounded

Re: [osg-users] Pragmatic shader - a new #pragma directive proposition

2016-01-15 Thread Sebastian Messerschmidt
Hi Robert, Hi Sebastian , First of all, the lightning shader only illustrates one of the cases where (optionally) repeating a code block containing substitution parameter can be useful. I used the multi-light lightning as an illustration only. First, thank you for your input. Yes, that