Re: [osg-users] Matrix uniforms glsl

2014-04-17 Thread Robert Osfield
Hi Jamie, On 2 April 2014 17:01, Jaime xatp...@hotmail.com wrote: I want to use matrix uniforms with GLSL shaders. I want to use MVM (modelview matrix) , MVP (modelviewprojection matrix) and NormalMatrix. How can I update it? To update a uniform you simply do: myuniform-set(value);

Re: [osg-users] Couple of quest about Offset Polygon, Composite Viewer in window, license

2014-04-17 Thread Robert Osfield
On 30 March 2014 08:19, Sonya sonyablade2...@hotmail.com wrote: I've got couple of questions in my mind I would be very glad if anyone can answer them. *How to achieve the effect of showing the edges of shapes along with rendered surface. So the edges becomes more emphasized and visible.

Re: [osg-users] render main scene and 2d menu in single RTT

2014-04-17 Thread Robert Osfield
On 28 March 2014 19:58, Anton 86o...@gmail.com wrote: What you think? Overload... that's one lot of code you are expecting us to review and debug. I suspect this is the main reason why you haven't had a reply, too much to consider into one post. Try breaking things down. Robert.

Re: [osg-users] FBO - Write to texture array using sampleBuffer

2014-04-17 Thread Robert Osfield
Hi Paul, The way to bind a texture to the output of shader is to use an FBO. Robert, On 19 March 2014 11:44, paul cooper paul.ta...@internode.on.net wrote: Hi all, I would like to use shaders - especially a sampleBuffer to write to a floating point texture containing data. Do I have to

Re: [osg-users] Applying shaders or other effects within a shaped region.

2014-04-17 Thread Robert Osfield
Hi Josh, What you are trying to achieve is a step beyond entry level graphics so you'll need to be patient with learning all the bits required. The easiest way to do effects like this would be use multi-pass technique where the main scene without effects is rendered to the whole GraphicsWindow,

Re: [osg-users] [forum] Change the position and rotation angle of the camera

2014-04-17 Thread Robert Osfield
Hi Becky, If you viewer has a CameraManipulator attached to it he manipulator will keep overriding the matrix you set on each frame, simply don't assigned a CameraManipulator and you should be fine. Robert. On 1 April 2014 10:37, ying song ying.s...@epfl.ch wrote: Hi, I draw a box using

Re: [osg-users] Camera callbacks

2014-04-17 Thread Robert Osfield
HI John, As the Camera has Initial/Pre/Post and FinalDrawCallbacks having add/remove/getNum/get methods rather than just set/get will mean a lot of extra new methods expanding an already large API. To avoid a big expansion in the API it would probably be best to push the list of callbacks onto

Re: [osg-users] FBO - Write to texture array using sampleBuffer

2014-04-17 Thread Paul Pocock
Had it worked out - Thanks for your reply though :) On 17/04/14 18:14, Robert Osfield wrote: Hi Paul, The way to bind a texture to the output of shader is to use an FBO. Robert, On 19 March 2014 11:44, paul cooper paul.ta...@internode.on.net wrote: Hi all, I would like to use shaders -

Re: [osg-users] 'osgwidgetbox' example can not work in HORIZONTAL_SPLIT stereo mode with OSG3.2.0 or higher

2014-04-17 Thread Robert Osfield
On 10 April 2014 10:33, Junjie Xue bit...@gmail.com wrote: I still can not work around this issue. Is there anyone who can help? 3.2.x introduced a new way of managing events to better handle complex viewer setups such as ones with distortion correction, it could be the osgWidget does play well

Re: [osg-users] request for small source change in StandardShadowMap

2014-04-17 Thread Robert Osfield
Hi Nick, There isn't any way of me judging changes I haven't seen. In general if there is part of the OSG that isn't able to do what a users need it to do but a small change that is consistent with the overall design can achieve this then I'll be open to considering it to be merged. However, I

Re: [osg-users] Scale Flattening and LODs

2014-04-17 Thread Robert Osfield
HI Karl, I'm trying to guess what is going on front the details you've provided. Are you saying that the osgUtil::FlattenStaticTransforms is not handling LOD's correctly? Have you looked at the source code to see what it's doing/not doing? Robert. On 14 April 2014 20:03, Cary, Karl A.

Re: [osg-users] Iterator bug

2014-04-17 Thread Robert Osfield
Hi Alexis, There are a number of issues at play here. First up the OSGPL license doesn't just allow you to grab OSG source code and embed it in your application - unless you are planning to publish your application OSGPL, otherwise it's copyright infringement. Secondly if your compiler is

Re: [osg-users] osgQt build error

2014-04-17 Thread Riccardo Corsi
Hi Alexey, to build osgQt library with osg using full OpenGL, you need to use the full OpenGL version of Qt as well. Qt built with ANGLE expects OpenGL-ES compliant code. If you want to use ANGLE version, I guess you should be fine if you compile osg with ES flag as well - I never tried this

Re: [osg-users] multi-threading troubles with 2 graphic cards

2014-04-17 Thread Robert Osfield
Hi Thierry, I recently checked in a fix to OpenThreads's pthread affinity, from svn log: r14135 | robert | 2014-04-07 15:11:14 +0100 (Mon, 07 Apr 2014) | 15 lines From Marcel Pursche, The problem is that when OpenThreads

Re: [osg-users] A suspicious bug of MatrixD

2014-04-17 Thread Robert Osfield
Hi Tianlan, Could you provide a small example that illustrates the problem? I did a quick test of: osg::Matrixd matrix = osg::Matrixd::scale(3.0,4.0,1.0); OSG_NOTICEMatrixd.getScale() = matrix.getScale()std::endl; And this works. I will need to have a think about a more

Re: [osg-users] request for small source change in StandardShadowMap

2014-04-17 Thread Trajce Nikolov NICK
Hi Robert, let me do the changes then and I will send them to You so You decide. And thanks! Nick On Thu, Apr 17, 2014 at 10:44 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Nick, There isn't any way of me judging changes I haven't seen. In general if there is part of the OSG that

Re: [osg-users] Iterator bug

2014-04-17 Thread alexis pierre
Hi, Thanks for your answer. I wasn't planning to add this file permanently, it was just a way to debug my software until I found why my compiler couldn't find the binaries (turned out I just forgot to add ogsUtil in my cmake file). Now that I have added that and removed the file it seems to

Re: [osg-users] Scale Flattening and LODs

2014-04-17 Thread Cary, Karl A.
Looking at the code for FlattenStaticTransformsDuplicatingSharedSubgraphs, as that is what appears to be running, the apply(LOD) function adjusts the center with a setCenter call, but there is no adjustment done to the radius. Since the setCenter call will enable the USER_DEFINED_CENTER mode,

Re: [osg-users] Understanding Node Clone Options

2014-04-17 Thread Robert Osfield
HI Karl, If the standard cloning options don't do exactly what you want then simply write your own method for cloning. A custom NodeVisitor should be easy to write, where you do a shallow copy on all the nodes you don't want to share and just directly assign the nodes/objects from the subgraph

Re: [osg-users] snapshot with fixed size

2014-04-17 Thread Robert Osfield
Hi FL, I'd use a slave Camera attached to the Viewer that shares the same graphics context as the main viewer windows, have this Camera use an FBO, and just set up the viewport and buffers to the size you need. You can toggle on/off the slave Camera by setting it's NodeMask to 0x0 for off,

Re: [osg-users] Iterator bug

2014-04-17 Thread Robert Osfield
Thanks for your answer. I wasn't planning to add this file permanently, it was just a way to debug my software until I found why my compiler couldn't find the binaries (turned out I just forgot to add ogsUtil in my cmake file). Now that I have added that and removed the file it seems to

Re: [osg-users] What should be used to simulate a camera on aircraft?

2014-04-17 Thread Robert Osfield
Hi Arden, The NodeTrackerManipulator tracks nodes in the scene and creates a view matrix for the Camera to track it. It doesn't do exactly what you won't but the implementation might provide inspiration. The key bit is computing the transform of the aircraft and then camera relative to this,

Re: [osg-users] Crashes in drivers

2014-04-17 Thread Robert Osfield
Hi Jan, Working around driver bugs can be difficult, especially so when you don't have access to the problem hardware/drivers. You don't mention anything about the nature of the scene graph being used or the hardware/drivers that the problems are occurring on so there really isn't anything

Re: [osg-users] build errors in VPB and latest trunks.

2014-04-17 Thread Robert Osfield
Hi Ewe, There are tweaks to VBP that have now been checked in, so an svn update may well help. Robert. On 5 February 2014 09:41, Uwe Woessner woess...@hlrs.de wrote: Hi, My reply comes a little late but I ran into the exact same problem and others might too thus I am posting my work around

Re: [osg-users] How to make overlaying osg::Billboard

2014-04-17 Thread Robert Osfield
Hi Petr, You can force objects to always appear by setting the StateSet::RenderBintDetails to a high bin number to make it draw after other objects, and then disable the depth test for that subgraph so it always gets drawn. Robert. On 4 February 2014 09:52, Petr Svoboda upd...@seznam.cz wrote:

Re: [osg-users] Textures work great on all but 1 PC

2014-04-17 Thread Robert Osfield
Hi Paul, I don't think the OSG build settings are likely to be the issue, same applies ShaderComposer that will only be used if your explicitly invoke it. I suspect the drivers are at fault, have a look at updating them on the problem machine. Also look at the OSG examples, are these working?

Re: [osg-users] A suspicious bug of MatrixD

2014-04-17 Thread Tianlan Shao
Dear Robert, thank you for your reply, below is the code to reproduce the bug: // osg::Matrixd S = osg::Matrixd::scale(3.0, 4.0, 5.0); osg::Matrixd R = osg::Matrixd::rotate(osg::Quat(0.1, 0.5, 0.6, 0.7)); osg::Matrixd T =

Re: [osg-users] A suspicious bug of MatrixD

2014-04-17 Thread Robert Osfield
Hi Tianlan, I have done the following test where I provide a non unifom scale matrix then rotate it by 90 degrees, and then output the result of getScale() and the result of you suggested above: osg::Matrixd scale_then_rotated =

Re: [osg-users] BasicAnimationManager IntersectVisitor

2014-04-17 Thread Robert Osfield
Hi Maxim, On 25 February 2014 05:29, Maxim Gammer maxgam...@gmail.com wrote: I used the osgUtil :: IntersectionVisitor, but it did not fix the problem. Object based on the osgAnimation :: BasicAnimationManager not visible to IntersectionVisitor ( Perhaps the osgAnimation author, Cedric

Re: [osg-users] Finding adjacent TerrainTiles

2014-04-17 Thread Robert Osfield
Hi Lawrence, The osgTerrain::Terrain node that decorates an VPB generated database keeps track of all the tiles via their TileID index, you can then get the tile based on this TileID and getting the neighbours is simply a case of adding to the TileID x and y values. Robert. On 21 February 2014

Re: [osg-users] PagedLOD TerrainTile

2014-04-17 Thread Robert Osfield
Hi Lawrence, Your custom NodeVisitor will be using the default traversal selection for PagedLOD rather than one based on camera distance for the PagedLOD child as is done in the cull traversal.You'll need to set up your custom NodeVisitor with the Camera position, the following NodeVisitor

Re: [osg-users] how to use symbols in ttf file like normal characters

2014-04-17 Thread Robert Osfield
Hi Peter, I'm not clear on what the problem is. The characters you pass to the osgText::Text can be a std::string which is nice and convenient for ASCII characters, but for extended characters sets you'll want to use the wider character support. The wide character support is provided by

Re: [osg-users] Usign OSG Shader

2014-04-17 Thread Robert Osfield
Hi Srikanth, Your shader just needs to handle the base texture as well as the colour you generate for the height. I can't really teach you all you need to know from a simple post, I have to recommend that you learn a bit more about OpenGL shaders directly from OpenGL books/resources on the

Re: [osg-users] Manipulator on RTT camera

2014-04-17 Thread Robert Osfield
Hi Baptiste, The osgdistortion example is probably the best place to learn how to do the type of RTT that you want. The key part is that your RTT Camera will be a slave Camera attached to the viewer, with the slave Camera using the default RELEATIE_RF RefnerceFrame to it inherts the view and

Re: [osg-users] switching shading between 2 passes

2014-04-17 Thread Robert Osfield
Hi Baptiste, I would recommend trying to keep a minimal set of osg::Program that are provided high up in the scene graph and apply to whole chunks. To do the multi-pass you'll then duplicate the high level nodes but share the subgraphs so the bulk of the scene graph remains the same. Robert.

Re: [osg-users] Geometry in a Geode

2014-04-17 Thread Robert Osfield
Hi Quentin, You haven't provide enough information about what you are doing to know what is going wrong. My best guess is that you've got DisplayLists enabled on the osg::Geometry (this is the default) but haven't called dirtyDisplayList() and dirtyBound(); Robert. On 27 August 2013 11:18,

Re: [osg-users] Framerate Drop in Rendering Multiple 1080p videos in OsgViewer

2014-04-17 Thread Robert Osfield
Hi Balajee.R.C, I would suspect a driver issue with it getting overwhelmed by the amount of data and stops sync the CPU and GPUs efficiently. Try other hardware and other drivers to see if you can see a pattern. Robert. On 16 September 2013 10:12, Balajee.R.C balaje...@gmail.com wrote: Hi,

Re: [osg-users] [forum] update partial of geometry

2014-04-17 Thread Robert Osfield
Hi Ding, Rather than using thousands of PrimitiveSet's try building your geometry with a smaller set of PrimitiveSet, this will result in a much lower CPU overhead when you are rendering without display lists. Robert. On 25 September 2013 11:03, ding zheng dingzheng...@hotmail.com wrote: Hello

Re: [osg-users] DatabasePager and incremental compiler operation in a shared context

2014-04-17 Thread Robert Osfield
Hi Jose, The OSG's is written to handling multi-theading of shared contexts as handling this special case would require us to add lots of mutex locks to all OpenGL code that is setting or using OpenGL objects. It's better to avoid shared contexts. Robert. On 24 September 2013 06:34, Jose

Re: [osg-users] How to get the colors of the points from a osgb or osgt file

2014-04-17 Thread Robert Osfield
Hi Yong, You'll need to load the file then use a custom NodeVisitor to traverse through the scene graph to locate all the osg::Geode leaves, then look at all the osg::Geometry within the Geode's and get the colours from the ColorArray attached to the osg::Geometry. Have a look at the NodeVisitor

Re: [osg-users] osgTexture Dynamic Image Loading

2014-04-17 Thread Robert Osfield
Hi Arjun, There is way too little information about what you are specifically doing to know what you are doing wrong. In principle you can update osg::Image or assign new osg::Image to osg::Textutre and they should update, but as you don't provide an indication let alone code of how you actually

Re: [osg-users] Render frame only for one camera

2014-04-17 Thread Robert Osfield
Hi Andreas, Implementing picking using OpenGL is typically very inefficient as it forces a round trip to the GPU and stalls the CPU and GPU while they wait for each other. Is there a reason why you can't do the picking using a CPU operation? As for doing custom Camera traversals, there is no

Re: [osg-users] Wrong geode display on screen

2014-04-17 Thread Robert Osfield
Hi Sylvain, It sounds like the OpenGL object caches aren't being cleared when the graphics context deletes (the OSG has to use these caches as you can't delete OpenGL from any thread that can delete a scene graph object.) There is lots of support within the OSG to try and catch this properly, but

Re: [osg-users] How to use more than 4 texture units?

2014-04-17 Thread Robert Osfield
Hi Hailong, The OSG itself places no restriction on the number of texture units, but some OpenGL drivers can do, particularly for the fixed function pipeline, perhaps you are hitting up against this. I know that NVIdia have recently reduced the number of texture units they support using the

Re: [osg-users] error C2065: 'Cube': undeclared identifier

2014-04-17 Thread Robert Osfield
Hi Lukas, There is no way for a 3rd Party to know what is amiss with your code with such scant details. What I can say is that with a compiler error like this it's entirely down to your own C++ code and really nothing to with the OSG. This is an OSG forum/mailing list, we can help you with OSG

Re: [osg-users] new constructor

2014-04-17 Thread Robert Osfield
Hi Lukas, You can't do a addChild() on a object that is a subclass from osg::Geode because Geode has no addChild() method. Please look at the headers. Robert. On 5 January 2014 12:40, Lukas Koebler lukasnachhi...@gmail.com wrote: Hi, I´m new in OSG and I hope you can help me. I´ve done a

Re: [osg-users] glGenBuffers not supported by OpenGL driver

2014-04-17 Thread Robert Osfield
Hi yangzhongqi, You don't say how you've created the graphics context, what OpenGL version the context reports, what version of OpenGL your hardware and drivers supports so... there really is far too many unknowns for us to be able to do anything other than guess. My guess is however you've

Re: [osg-users] osg::Program and osgViewer::Renderer::Compile

2014-04-17 Thread Robert Osfield
HI Filip, I don't know whether it'll help with your case, but it's worth trying, there are fixes in svn/trunk and OSG-3.2 for handling osg::Program combinations in GLObjectVisitor/IncrementalCompileOperation so I'd recommend you try one of these versions of the OSG to see if that helps. Robert.

Re: [osg-users] How integrate openGL code inside OSG

2014-04-17 Thread Robert Osfield
Hi JacaYang, You don't say what the problem you are seeing is. In general you are going the direction that should work, but there is too little information about how you assinging your callback or what the problems you are seeing are. In general I'd say that integrating OpenGL code can be a bit

Re: [osg-users] [build] Building with Eclipse and MinGW. __int64 definition in GL

2014-04-17 Thread Robert Osfield
Hi Marc, MinGW isn't a commonly used platform for OSG users so I'm afraid it's a case of those who want to use MinGW need help fix the problems as they occur. If you have a fix then subscribe to and a send en email with the whole modified file to osg-submissions mailing list so it can be

Re: [osg-users] [build] Building with Eclipse and MinGW. __int64 definition in GL

2014-04-17 Thread Alexpux
17 апр. 2014 г., в 20:19, Robert Osfield robert.osfi...@gmail.com написал(а): Hi Marc, MinGW isn't a commonly used platform for OSG users so I'm afraid it's a case of those who want to use MinGW need help fix the problems as they occur. If you have a fix then subscribe to and a send en

Re: [osg-users] multi-threading troubles with 2 graphic cards

2014-04-17 Thread Thierry Pébayle
Hi Robert, thanks very much for your answer. I have updated OpenThreads lib (3.2.0-3.3.0) but it does not help much. In fact I think that OSG works well but not like I espect it to work... Let me explain: I run my application twice (once in each X server) in parallel. So there is just one

Re: [osg-users] Wrong geode display on screen

2014-04-17 Thread Sylvain Comtois
Hi Robert, We use the last stable release 3.2. Thank you! Cheers, Sylvain -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=59037#59037 ___ osg-users mailing list

Re: [osg-users] osgQt QWidgetImage as HUD not getting events

2014-04-17 Thread Nick Modly
I have tried adding the InteractiveImageHandler to the view that I want to handle them, but they still do not get any events. Any other suggestions? Cheers, Nick -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=59038#59038

Re: [osg-users] osgQt QWidgetImage as HUD not getting events

2014-04-17 Thread Nick Modly
I found that I was using the wrong constructor for the Interactive Image Handler, I think; It seems that the IIH expects the image to either be part of the scene OR be a full screen HUD, not the sort of half-and-half that I have. Using the other constructor for the IIH, one of my widgetImages

[osg-users] Issues with alpha blended texture overlay

2014-04-17 Thread Steven Powers
Hi, I tried to add a texture overlay that gets rendered through an orthographic projection at the top of the scene graph. When I do so all objects in the background of the scene that have transparency are no longer visible. What am I doing wrong? The texture is a png with transparency applied

Re: [osg-users] Issues with alpha blended texture overlay

2014-04-17 Thread Josh Hamell
On 04/17/2014 01:06 PM, Steven Powers wrote: Hi, I tried to add a texture overlay that gets rendered through an orthographic projection at the top of the scene graph. When I do so all objects in the background of the scene that have transparency are no longer visible. What am I doing

Re: [osg-users] Issues with alpha blended texture overlay

2014-04-17 Thread Steven Powers
That was it! I thought I had already tried that but I think I might have put it on the wrong node. Thank you! Cheers, Steven -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=59042#59042 ___

Re: [osg-users] A suspicious bug of MatrixD

2014-04-17 Thread Tianlan Shao
Dear Robert, thank you very much for your time. I still have doubt about the interpretion of the experiment: ...so we'd expect the scale of the x and y axis to be swapped.. I think that means, after rotation, the scale is still represented in the original frame, instead of the rotated one

Re: [osg-users] A suspicious bug of MatrixD

2014-04-17 Thread Tianlan Shao
Dear Robert, I'd like to add that, when the x, y, and z scale factors are identical, the current getScale() gives the same result as the newly proposed one. I guess that's the reason why this issue was not reported before. Thank you very much. Best regards, Tianlan Shao On Fri, Apr 18, 2014 at

Re: [osg-users] [vpb] Windows and weird error messages

2014-04-17 Thread David Glenn
Greetings All! I just went through the same thing! It would be good to make note of it some ware in a readme about it! I had to search though the forum to figure it out and I'm not sure I like the fix, but I can't find any better idea to work around it, but it works. The only other advice I