Re: [osg-users] Possible bug in osg::State::applyShaderCompositionUniform

2013-09-24 Thread Robert Milharcic
On 23.9.2013 23:24, Aurelien Albert wrote: Thanks for the sharing offer, I'm interested ! I think I've made some progress in the analysis of my problem, could you just test the following inside your experimental shader composition project ? (I would like to know if you have any side effects.)

Re: [osg-users] Possible bug in osg::State::applyShaderCompositionUniform

2013-09-24 Thread Aurelien Albert
Hi, Thanks for testing ! I've already seen the problem of the growing list... But I don't know how to avoid this, because if I left the call to currentShaderCompositionUniformList.clear(), some uniforms are not properly applied. For example : - Node A : Shader Program + Shader Composition

Re: [osg-users] Possible bug in osg::State::applyShaderCompositionUniform

2013-09-24 Thread Robert Milharcic
On 24.9.2013 8:40, Aurelien Albert wrote: - Node A : Shader Program + Shader Composition Uniforms Child node B : nothing Child node C : Shader Program In this case, Shader Composition Uniforms are properly applied on the Shader Program from node A, but not on shader program from node

Re: [osg-users] Possible bug in osg::State::applyShaderCompositionUniform

2013-09-24 Thread Aurelien Albert
Hi, Have a look here to see why I use this (on Robert's advice) : http://forum.openscenegraph.org/viewtopic.php?t=11769 I know this is more like a workaround, but it is really usefull to be able to write StateAttributes classes which manage and apply their own uniforms. To solve my problem

[osg-users] question about getting RGB value(los point) of Terrain

2013-09-24 Thread Kim JongBum
Hi, i am trying to get RGB value(los point) of Terrain i tried with below code. osg::Drawable * drawable = intersection.drawable.get(); if(drawable-getStateSet()) { state_set = drawable-getStateSet(); osg::Texture *

Re: [osg-users] Possible bug in osg::State::applyShaderCompositionUniform

2013-09-24 Thread Robert Milharcic
On 24.9.2013 9:05, Aurelien Albert wrote: I know this is more like a workaround, but it is really usefull to be able to write StateAttributes classes which manage and apply their own uniforms. To solve my problem described in this post, my guess is I have to replace the

Re: [osg-users] question about getting RGB value(los point) of Terrain

2013-09-24 Thread Robert Osfield
Hi Kim, You can't use the intersection point directly as this will be object coordinates, not texture coordinates that the image is in. What you will need to do is get the texture coordinates for the intersected geometry. In OSG-3.2 there is a convinience method that has been added to

[osg-users] Trying to add normal mapping shader to osgShadow::SoftShadowMap

2013-09-24 Thread michael kapelko
Hi. I'm on my way to add normal mapping to SoftShadowMap. As far as I understood, it only uses fragment shader. I started by adding a very simple vertex shader into SoftShadowMap::createShaders(). That's what createShaders() looks like by default:

Re: [osg-users] Possible bug in osg::State::applyShaderCompositionUniform

2013-09-24 Thread Aurelien Albert
Hi, If you do change the list to stack so you can push/pop uniforms you will end up redoing standard uniform handling but this time with a parallel uniform list. Yes, and I think this is what I need : - a standard uniform list, which contains uniforms setted from regular osg::Uniform

Re: [osg-users] Possible bug in osg::State::applyShaderCompositionUniform

2013-09-24 Thread Robert Milharcic
On 24.9.2013 14:40, Aurelien Albert wrote: Yes, and I think this is what I need : - a standard uniform list, which contains uniforms setted from regular osg::Uniform instances - a comes-from-stateAttribute uniform list, in the same way there is associated modes with some StateAttributes In

Re: [osg-users] Possible bug in osg::State::applyShaderCompositionUniform

2013-09-24 Thread Aurelien Albert
For example, push uniforms with ambient, diffuse, specular and shininess values from osg::Material, for OpenGL 3.3 It could also be used for application-specific StateAttribute classes, for example an ObjectData StateAttribute which push several uniforms on the state. -- Read

[osg-users] Proposal for uniforms applied from within a StateAttribute

2013-09-24 Thread Aurelien Albert
Hi, As discuted multiple times with Robert and others, sometimes it's really usefull to have a StateAttribute which also provide its own uniforms. For example, I use it in a modified osg::Material class to apply maerial values as uniform or to handle specific ObjectData StateAttribute classes

Re: [osg-users] Proposal for uniforms applied from within a StateAttribute

2013-09-24 Thread Robert Osfield
HI Aurelien, I'm currently deep into work on OSG scripting support and it's a complex enough topic that I don't have any spare brain cells for thinking about other topics, let alone once that are also complex. I expect to start crawling out from the most complex phase of my current work next

[osg-users] osgarchive and PagedLOD

2013-09-24 Thread Sebastian Messerschmidt
Hi folks, I found some problem which I'm not able to solve easily. I try to pack a large number of files in to an osga archive. This works pretty well, but it will fail if I try to archive nodes which contain PagedLODs. They get loaded by the DatabasePager, which is not what I want, as the

[osg-users] Olide, but goodie... Aero themes and OpenGL/MFC

2013-09-24 Thread Andrew Cunningham
Hi, This is an old one, that seemingly no-one has a solution for I am having problems on W7/W8 when aero is active in our MFC/OGL(OSG) based CAE style application. 1) MFC CSplitterWnd resizing leaves 'window garbage' behind 2) How to draw an rubber-banding zoom box (using XOR operations) on

Re: [osg-users] Proposal for uniforms applied from within a StateAttribute

2013-09-24 Thread Aurelien Albert
Hi Robert, No problem, script support in OSG will be great ! I'll try to make an optimized implementation and submit it. Thank you! Cheers, Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56472#56472

Re: [osg-users] Olide, but goodie... Aero themes and OpenGL/MFC

2013-09-24 Thread Chris Hanson
I think in order to do XORed drawing, you'd need to be in a single-buffered situation. Are you? If you are, you should be able to setup a HUD-like transform and draw using pixel coordinates. On Tue, Sep 24, 2013 at 1:57 PM, Andrew Cunningham andr...@mac.com wrote: Hi, This is an old one,

Re: [osg-users] Oldie, but goodie... Aero themes and OpenGL/MFC

2013-09-24 Thread Andrew Cunningham
I am using a double-buffered window as per the OSG MFC example. traits-doubleBuffer = true; The MFC example shows a nice overlay HUD of rendering statistics. This just seems such a typical 3D UI interaction - to show a rectangular area on the screen under mouse control for selection or