Re: [osg-users] Passing node transformations to the vertex shader

2011-09-30 Thread Sebastian Messerschmidt
I've encountered the same problem, and setting the context-getState()-setUseModelViewAndProjectionUniforms(true); for each context didn't work in any case (with a multi-pass offscreen rendering). So the simple solution for me was to use the #version 150 compatibility profile, which let's you

Re: [osg-users] RTT second pass

2011-09-30 Thread Sebastian Messerschmidt
I'm quite desperate on this one, any advises how to setup the camera in the second pass, anyone? Hello again, In my project I need to setup a second render pass that performs the following: Render the scene from the original camera's view (as in the first RTT pass). Set the second camera

[osg-users] RTT second pass

2011-09-30 Thread Sergey Kurdakov
Hi you might use osg::Switch see http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/examples/osggameoflife example ( see ProcessPass::ProcessPass(osg::TextureRectangle *in_tex,                        osg::TextureRectangle *out_tex, ) and then there is osgPPU

[osg-users] RTT second pass

2011-09-30 Thread Sergey Kurdakov
Hi, forgot so follow up - concerning osg::Camera::FRAME_BUFFER_OBJECT for attaching depth etc to frame buffer object you might want to check this page http://www.opengl.org/wiki/Framebuffer_Object_Examples Regards Sergey ___ osg-users mailing list

Re: [osg-users] Geometry nodes with VBO

2011-09-30 Thread Robert Osfield
Hi Ga, First up I would recommend moving away from GLUT as it just complicates things, the basic osgViewer::Viewer is far more flexible, feature rich, scalable and easier to use. Second, the vertex data in the OSG is stored in a osg::Vec3Array which is implemented with a std::vectorVec3 so you

Re: [osg-users] 3.0.1 stutters on SwapBuffers

2011-09-30 Thread Robert Osfield
Hi Pete, This rather sounds like a driver issue. Could you try running your tests on another system with different hardware and drivers. Cheers, Robert. On Thu, Sep 29, 2011 at 9:05 PM, Peter Amstutz peter.amst...@tseboston.com wrote: Hello all, I have a performance regression with 3.0.1.  

[osg-users] RTT second pass

2011-09-30 Thread Sergey Kurdakov
Hi Sebastian, as for depth buffer - you might try ( not sure though ) two approaches a) use depth replace shader ( replace current depth with provided depth ) b) use depth testing in shader - such that you manually compute depth value and compare it with attached depth texture in shader see

Re: [osg-users] RTT second pass

2011-09-30 Thread Sebastian Messerschmidt
Hello Sergey, Thanks for the hints so far. I'll check the approaches. Hi Sebastian, as for depth buffer - you might try ( not sure though ) two approaches a) use depth replace shader ( replace current depth with provided depth ) b) use depth testing in shader - such that you manually compute

Re: [osg-users] 3.0.1 stutters on SwapBuffers

2011-09-30 Thread Martin Naylor
Hi, What happens if you change the threading mode? I am just wondering if its related to the GPU stats issue and stuttering, changing the threading mode seems to clear it. Have a search in the forums, for the subject 'stats issue with SVN'? Regards Martin Naylor -Original Message- From:

Re: [osg-users] [ANN] New OSG book on the way, and new plan of OSG recipes

2011-09-30 Thread PP CG
Hi Wang, Don't worry about this. The title may not be able to tell the methods used directly. In fact there are already several examples showing how to integrate OSG and OpenGL in different ways: [Ch2] Using draw callbacks to execute NVIDIA Cg functions: use camera draw callbacks to call NVCG

[osg-users] OSG Shadow debugging

2011-09-30 Thread Jaap van den Bosch
Hi, I'm trying to get osgShadow to work with Vizard, an OSG based VR toolkit. I wrote a plugin which inserts a shadowedScene node and it all seems to be ok, but the shadows are not there. I made a simple scene (ground, duck and 2 balls) as shown in the first picture. There is one light,

[osg-users] [osgPPU] Fix picture freeze for certain camera perspectives.

2011-09-30 Thread Alexander Irion
Hi, I had the problem in my application, that the picture was frozen for certain camera perspectives. This is caused due to the near far auto computation, that also takes the geometry of the osgPPU::Unit's into concern. For the faulty case, updateCalculatedNearFar(..) in

Re: [osg-users] [osgPPU] Near/Far clip planes: problem?

2011-09-30 Thread Alexander Irion
Hi, I had the same issue - please find my fix here: http://forum.openscenegraph.org/viewtopic.php?p=43140#43140 It prevents the osgPPU::Unit's from beeing taken into account for near/far computation. --Alex -- Read this topic online here:

Re: [osg-users] Passing node transformations to the vertex shader

2011-09-30 Thread Joel Graff
J-S, Thanks for the reply. I hadn't sat down and compared matrices yet, but I had debugged to ensure I was getting something. And yes, I'm accommodating for the fact that it's a ModelView (and not just a Model) matrix. I've also been using the osg_ attributes to this point, in lieu of the

Re: [osg-users] [osgPPU] Fix picture freeze for certain camera perspectives.

2011-09-30 Thread Jean-Sébastien Guay
Hi Alexander, Please find attached fix for osgPPU::Unit that prevents it's geode from be taken into account for near far computation. Nice to see you fixed this at the source, I had just overridden the Processor class and disabled near/far computation for the whole Unit subgraph, but

Re: [osg-users] Passing node transformations to the vertex shader

2011-09-30 Thread Jean-Sébastien Guay
Hi Joel, So far as your optimization tip goes, I assume you're meaning to apply the shader at the transform node as well? I've been doing that sort of thing already, just not on my Transform nodes... No, I mean that all non-Transform children under a Transform will have the same

[osg-users] How to setup and confirm a proper forward-compatipble GL3 context

2011-09-30 Thread Peter Wrobel
Hi, I have some doubts about my approach to create a GL3 non FFP context. I have compiled osg with all the cmake settings for GL3 as explained in lots of other posts. When I create an object ( a simple two Vertex line ), usual camera manipulation is working without me having writrten a single

Re: [osg-users] How to setup and confirm a proper forward-compatipble GL3 context

2011-09-30 Thread Jean-Sébastien Guay
Hi Peter, I don't know about your other questions about the GL 3 context, but I can answer this since I've been looking at it recently. How do I get these default osg_ Uniforms into the StateSet ? The only place where I find code for creaating them is osgUtil::SceneView, which is marked as

Re: [osg-users] Open Flight characteristic not reflected in the current OSG

2011-09-30 Thread Paul Martz
I agree, your model has blending enabled, and the face has non-1.0 transparency. It'll be a couple days before I can dig into this. When I fixed the rgb part of this issue, I looked through the flt spec, and don't remember seeing anything about how transparency should be handled. But I'll take

Re: [osg-users] [osgPPU] Fix picture freeze for certain camera perspectives.

2011-09-30 Thread Luca Vezzadini
Hi, Cool to see this fixed. Did you post this on the osgPPU trunk? I don't seem to see any recent change there... By the way, what version of OSG are you using to compile it? I just tried osgPPU 0.4.2 with OSG 3.0 and there seem to be a few changes to make to make it compile. Luca

Re: [osg-users] [osgPPU] Fix picture freeze for certain camera perspectives.

2011-09-30 Thread Jean-Sébastien Guay
Hi Luca, Cool to see this fixed. Did you post this on the osgPPU trunk? I don't seem to see any recent change there... I think Alexander just posted a modified file, the changes haven't been integrated into osgPPU yet. By the way, what version of OSG are you using to compile it? I just

Re: [osg-users] Passing node transformations to the vertex shader

2011-09-30 Thread Joel Graff
J-S, Of course. It's not that I didn't know state is inherited by child nodes, but for some reason, my testing of uniform inheritance failed, so I was manually propagating uniform pointers... Took 30 seconds to disable that code and prove your point. Thanks again. - Joel