[osg-users] BasicKeyboardInput example

2009-07-17 Thread Danny Lesnik
Hi, I'm learning OSG throught the examples in tutorials section. I'm looking in following tutorial: http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/BasicKeyboardInput There is some piece of code: class updateTankPosCallback : public osg::NodeCallback { public:

Re: [osg-users] osg on iPhone / iPod touch with OpenGL ES 1.1

2009-07-17 Thread Robert Osfield
Hi Marco, No OpenGL ES 1.x code has been checked in yet, but there have been successful trail ports to OpenGL ES 1.x. Next week I'll just so happen to be with a client interested in this side of work, although not related to the iFamilyOfProducts, so hopefully we'll be able to come up with

Re: [osg-users] nodemask doesn't work with stereo

2009-07-17 Thread Robert Osfield
Hi Christophe, When in stereo there are separate cull masks for the left and right eyes, have a look at osg::CullSettings. Robert. On Thu, Jul 16, 2009 at 9:38 PM, Christopher Backchrb...@gmail.com wrote: Hi all, I was wondering if anyone might know why the nodemask I set for displaying CAD

Re: [osg-users] Getting System time, milliseconds

2009-07-17 Thread Robert Osfield
Hi Kelly, Is it just that you need to multiple the number of seconds my 1000 to get milliseconds? This does seem a bit of trivial answer so I do wonder if your actually after something else. Robert. On Thu, Jul 16, 2009 at 7:05 PM, Kelly Fieldskelly.br...@jhuapl.edu wrote: Hi, I am new to

Re: [osg-users] osgText Chopping Letters

2009-07-17 Thread Robert Osfield
Hi Mike, On Thu, Jul 16, 2009 at 6:39 PM, Mike Hallmike.hallo...@gmail.com wrote: I have attached an image showing the issue. Could you toggle texturing off, this will show whether it's an potential issue of the text quads overlapping and causing problems with z buffer precedence. Mark's

Re: [osg-users] Getting System time, milliseconds

2009-07-17 Thread Paul Melis
Robert Osfield wrote: Is it just that you need to multiple the number of seconds my 1000 to get milliseconds? This does seem a bit of trivial answer so I do wonder if your actually after something else. I guess the OP wants millisecond precision? Paul Robert. On Thu, Jul 16, 2009 at 7:05

[osg-users] Processor usage and frame rate limitation

2009-07-17 Thread Vincent Bourdier
Hi all, Looking for benchmark for our application, we just saw that the processor usage never goes up to 50% (on dual cores). I set the vsync to false in my graphic card drivers, but no way... the processor never use more than one core. This is not good for our application, because we would like

[osg-users] Problem with Collada plugin...

2009-07-17 Thread neil.hughes
Hi All, Has anyone else had a problem with the collada plugin whereby if the name of an osg node has a space in it, then if this is assigned to a url, source or target attribute - as is the case for geometries and materials - the spaces are replaced with %20. This would be ok, but the actual

[osg-users] Concurrent updates to the scene graph

2009-07-17 Thread Karl Wurzel
Hi, Is it possible in OSG to make changes to the scene graph from a thread other than the rendering thread? What kind of thread-safety does OSG provide on its own and which OSG functions that run in the rendering thread will have to be protected with additional mutexes? I already tried

[osg-users] HUD not resizing

2009-07-17 Thread Vincent Bourdier
Hi all, As you know, and when you resize the windows (osgHud example) the hud resize with the window size ratio. So, the text in the hud in not readable anymore. I'm looking at a way to keep the hud ratio constant even if the window ratio change. Any idea ? because transforming the hud during

Re: [osg-users] Getting System time, milliseconds

2009-07-17 Thread Kelly Fields
Yes, sorry - I need millisecond precision. So I need a number to be like 3.234 seconds rather than 3 seconds -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15066#15066 ___ osg-users mailing list

Re: [osg-users] [forum] We are back! Data successfully restored from crashed HD with freezer trick :)

2009-07-17 Thread Pierre BOURDIN
2009/7/16 Art Tevs arti_t...@yahoo.de: Hi guys, Hi Art, Yes, I wanted to first just change the hd controller, so to use the slap trick. However, I wasn't able to find the same hd on any of the online stores. So this wasn't an option any more. Therefor the only options left, were either

Re: [osg-users] Getting System time, milliseconds

2009-07-17 Thread Paul Melis
Kelly Fields wrote: Yes, sorry - I need millisecond precision. So I need a number to be like 3.234 seconds rather than 3 seconds But aren't those methods you used from the Delta3D API? Are you sure these methods are in OSG? Paul ___ osg-users

[osg-users] Unit tests

2009-07-17 Thread Vincent Bourdier
Hi all, For our osg-based project, I am searching for unit tests. Visual Studio implement them only in managed c++, so I am looking at different libs to do that. I just tried googleTest, but it needs a /MT compilation instead of osg needs a /MD ... So, what tool do you use for unit test ? (we

Re: [osg-users] Unit tests

2009-07-17 Thread Tomlinson, Gordon
we write our own Gordon Product Manager 3d __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com __ From:

Re: [osg-users] Getting System time, milliseconds

2009-07-17 Thread J.P. Delport
In OSG you could do something like: osg::Timer *globalHighResTimer=osg::Timer::instance(); uint64_t currentTimeNanoSec() { osg::Timer_t timer_t=globalHighResTimer-tick(); return (uint64_t)(timer_t * globalHighResTimer-getSecondsPerTick() * 10);//timerTick *

Re: [osg-users] Getting System time, milliseconds

2009-07-17 Thread Paul Melis
J.P. Delport wrote: In OSG you could do something like: osg::Timer *globalHighResTimer=osg::Timer::instance(); uint64_t currentTimeNanoSec() { osg::Timer_t timer_t=globalHighResTimer-tick(); return (uint64_t)(timer_t * globalHighResTimer-getSecondsPerTick() *

Re: [osg-users] Getting System time, milliseconds

2009-07-17 Thread Paul Melis
Paul Melis wrote: J.P. Delport wrote: In OSG you could do something like: osg::Timer *globalHighResTimer=osg::Timer::instance(); uint64_t currentTimeNanoSec() { osg::Timer_t timer_t=globalHighResTimer-tick(); return (uint64_t)(timer_t *

Re: [osg-users] Getting System time, milliseconds

2009-07-17 Thread J.P. Delport
For Linux, play with this: #ifndef WIN32 /// High resolution timers for Linux. #define NSEC_PER_SEC 10LL inline uint64_t timespec_to_ns(const struct timespec *ts) { return ((uint64_t) ts-tv_sec * NSEC_PER_SEC) + ts-tv_nsec; }

Re: [osg-users] Unit tests

2009-07-17 Thread Cedric Pinson
Hi Vincent, I use unittest++ (http://sourceforge.net/projects/unittest-cpp/), it's simple but works on linux and windows. I use cmake, then using ctest it makes test available to run on visual studio too. Cheers, Cedric On Fri, 2009-07-17 at 13:49 +0200, Vincent Bourdier wrote: Hi all, For

Re: [osg-users] HUD not resizing

2009-07-17 Thread Jean-Sébastien Guay
Hello Vincent, I'm looking at a way to keep the hud ratio constant even if the window ratio change. Not a complete answer, but the solution will probably be to implement a WindowResizeCallback that you set on the GraphicsWindow. This callback will be notified right after the window size

Re: [osg-users] Getting System time, milliseconds

2009-07-17 Thread Paul Melis
J.P. Delport wrote: For Linux, play with this: #ifndef WIN32 /// High resolution timers for Linux. #define NSEC_PER_SEC 10LL inline uint64_t timespec_to_ns(const struct timespec *ts) { return ((uint64_t) ts-tv_sec * NSEC_PER_SEC) + ts-tv_nsec; } ///

Re: [osg-users] Getting System time, milliseconds

2009-07-17 Thread Kelly Fields
I am working soley in Windows... any help there? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15078#15078 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] Processor usage and frame rate limitation

2009-07-17 Thread Robert Osfield
Hi Vincent, With graphics applications the load is taken up between the disks, memory, buses, CPU cores, CPU caches, GPUs, etc. any one of this might be the bottleneck at any one time. Which is most likely to be a bottleneck will depend on the nature of your application, the type of scene you

Re: [osg-users] Concurrent updates to the scene graph

2009-07-17 Thread Robert Osfield
Hi Karl, Lots has been written on this topic over the years on osg-users so please search the archives. The short story is that the OSG is design to do single threaded (or at least synchronous) updating of the scene graph, and multi-threaded cull and draw. Providing support for async update

Re: [osg-users] Getting System time, milliseconds

2009-07-17 Thread Robert Osfield
Hi Kelly, On Fri, Jul 17, 2009 at 12:35 PM, Kelly Fieldskelly.br...@jhuapl.edu wrote: Yes, sorry - I need millisecond precision.  So I need a number to be like 3.234 seconds rather than 3 seconds I'm really surprised that Delta3D code gives an interger time back. The OSG's FrameStamp stores

Re: [osg-users] Unit tests

2009-07-17 Thread Philip Lowman
On Fri, Jul 17, 2009 at 7:49 AM, Vincent Bourdier vincent.bourd...@gmail.com wrote: Hi all, For our osg-based project, I am searching for unit tests. Visual Studio implement them only in managed c++, so I am looking at different libs to do that. I just tried googleTest, but it needs a /MT

[osg-users] Geode blinking

2009-07-17 Thread Adrien Joly
Hi, First of all, english is not my mother tongue, so excuse my faults. I developped an icon with osg, which is an image, facing the camera whatever is placed the camera and has the same size on the screen whatever is the distance from the camera. The problem is that the icon is sometimes

Re: [osg-users] OpenSceneGraph-2.8.2 release candidate three tagged

2009-07-17 Thread Paul Melis
Robert Osfield wrote: I have another OpenSceneGraph 2.8.2 release candidate for you, just a couple fixes since 2.8.2-rc2: # Build fixes for: * Building of dicom plugin with ITK under Linux. # Crash fixes to: * crash during window destruction under Windows when using closing a MFC

Re: [osg-users] OpenSceneGraph-2.8.2 release candidate three tagged

2009-07-17 Thread Jason Daly
Paul Melis wrote: A collegue and I where wondering some time ago if the binary windows packages provided on the website are usable for debugging. Even though there are separate release and debug distributions the debug ones (at least the VS8 ones) don't seem to contain any .pdb files. I

Re: [osg-users] OpenSceneGraph-2.8.2 release candidate three tagged

2009-07-17 Thread Paul Melis
Jason Daly wrote: Paul Melis wrote: A collegue and I where wondering some time ago if the binary windows packages provided on the website are usable for debugging. Even though there are separate release and debug distributions the debug ones (at least the VS8 ones) don't seem to contain any

Re: [osg-users] Unit tests

2009-07-17 Thread Vincent Bourdier
Hi, thanks for the answers !! Philip, changing the option works, but the linker make a lot of warnings : http://msdn.microsoft.com/en-us/library/5ske5b71(VS.71).aspx that is very annoying... So I don't know if I will keep this one or not... unittest++ seems good, and cppunit too (if anyone have

Re: [osg-users] Geode blinking

2009-07-17 Thread Jean-Sébastien Guay
Bonjour Adrien, I developped an icon with osg, which is an image, facing the camera whatever is placed the camera and has the same size on the screen whatever is the distance from the camera. The problem is that the icon is sometimes blinking when I change the distance of the camera from

Re: [osg-users] HUD not resizing

2009-07-17 Thread Vincent Bourdier
Hi Jean Sebastien, This sounds like a great idea, but the problem remain the same : the HUD will be resized automatically... just because it is a HUD... the callback is the same thing like a RESIZE event on a handler I have, it gave me the event, but do not forbid the HUD to resize with the

Re: [osg-users] OpenSceneGraph-2.8.2 release candidate three tagged

2009-07-17 Thread Jean-Sébastien Guay
Hi Paul, Interesting, VS9's cl.exe reports that /Z7 option as enable old-style debug info. I guess progress isn't everything if you want integrated debug information :) Well the name old-style might also mean that there are drawbacks to using that option... I wouldn't know if the only

Re: [osg-users] Unit tests

2009-07-17 Thread Frank Miller
Vincent, If you are going to survey the available options you should also take a look at boost test. Frank On Fri, Jul 17, 2009 at 05:17:03PM +0200, Vincent Bourdier wrote: Hi, thanks for the answers !! Philip, changing the option works, but the linker make a lot of warnings :

[osg-users] Skydome

2009-07-17 Thread Boris Baljak
Hi, First I must say that I'm still currently learning OpenSceneGraph, although I'm already familiar with scene graphs since I also use Coin3D. However I need to use a skydome in a 3D visualization application which is built upon OSG. My main problem is that there is no 'simple' skydome

Re: [osg-users] HUD not resizing

2009-07-17 Thread Jean-Sébastien Guay
Hi Vincent, This sounds like a great idea, but the problem remain the same : the HUD will be resized automatically... just because it is a HUD... the callback is the same thing like a RESIZE event on a handler I have, it gave me the event, but do not forbid the HUD to resize with the window,

Re: [osg-users] Processor usage and frame rate limitation

2009-07-17 Thread Vincent Bourdier
Hi Robert, I understand that looking for a 100% of CPU usage is not a good goal, but our application goes around 15fps and the CPU still remain using 50% ... so we can't use big scene... I don't know were to find the bottleneck... or how to search it... The strange thing is that month or years

Re: [osg-users] OpenSceneGraph-2.8.2 release candidate three tagged

2009-07-17 Thread Jason Daly
Jean-Sébastien Guay wrote: Well the name old-style might also mean that there are drawbacks to using that option... I wouldn't know if the only effect is that the debug information is embedded instead of in a separate file. We develop with SCons (which uses the MSVC compiler on Windows),

[osg-users] Specular Highlight with Vertex Colors?

2009-07-17 Thread Andrew Burnett-Thompson
Hi all, I'm using vertex colors on my models to save on memory in a CAD-style application, as one color per geometry is more than sufficient for my needs. However, is it possible to have specular highlights when using vertex colors? For instance, I'm adding a color as follows

Re: [osg-users] Processor usage and frame rate limitation

2009-07-17 Thread Robert Osfield
Hi Vincent, On Fri, Jul 17, 2009 at 4:34 PM, Vincent Bourdiervincent.bourd...@gmail.com wrote: I understand that looking for a 100% of CPU usage is not a good goal, but our application goes around 15fps and the CPU still remain using 50% ... so we can't use big scene... I don't know were to

Re: [osg-users] Skydome

2009-07-17 Thread Garrett Potts
Hello Boris: I have been porting parts of Delta3d skydome which I think may have been a blend of osgEphemeris and flightgear but don't quote me on that. The base implementation uses no shaders but instead does vertex color bindings and updates the skydome based on real ephemeris. I

[osg-users] Picking and clipping together

2009-07-17 Thread Butler, Lee Mr CIV USA USAMC
Is there an accepted practice for doing pick operations while clipping planes are in use? I notice that the osgUtil::LineSegmentIntersector does not process ClipNode items in the scenegraph. This means that if geometry has been clipped away from the view, it still shows up in the list of

Re: [osg-users] Specular Highlight with Vertex Colors?

2009-07-17 Thread Jason Daly
Hi, Andrew, Andrew Burnett-Thompson wrote: // Set specular attribute mat-setDiffuse(osg::Material::Face::FRONT_AND_BACK, osg::Vec4(0,0,0,0)); mat-setSpecular(osg::Material::FRONT, osg::Vec4f(1.0f, 1.0f, 1.0f, 1.0f)); mat-setShininess(osg::Material::FRONT, 12.0f);

Re: [osg-users] Runtime texture mod

2009-07-17 Thread Jason Daly
Brad Huber wrote: Does anyone know of a good way to modify pixels in a texture at runtime w OSG? Basically I’m looking for a way for the user to select an arbitrary color to be used on an airplane or similar. EG ability to switch to any color as in the attached image. I’m hoping

Re: [osg-users] Specular Highlight with Vertex Colors?

2009-07-17 Thread Andrew Burnett-Thompson
Thanks for your reply Jason, I actually worked this out I think, I removed mat-setDiffuse and added mat-setColorMode(osg::Material::ColorMode::DIFFUSE) and it seemed to do the trick! Not sure why, but hey, it works. I now have a shared stateset with various attributes like specular/backface

[osg-users] osgDB::readNodeFile Thread Safe?

2009-07-17 Thread Pecoraro, Alexander N
Is the function osgDB::readNodeFile thread safe? I seem to remember in previous versions of the OSG API that the osgDB::DatabasePager would use a mutex to prevent threading issues when calling readNodeFile(), but in 2.8.0 it doesn't seem to do that anymore. Just wondering because I'm working

Re: [osg-users] Specular Highlight with Vertex Colors?

2009-07-17 Thread Thrall, Bryan
Andrew Burnett-Thompson wrote on Friday, July 17, 2009 10:42 AM: However so far I can see the only way to add specular is via a StateSet. I previously had one stateset per object, but this consumed too much memory, so now have a shared stateset I assume you're referring to your statement

Re: [osg-users] Specular Highlight with Vertex Colors?

2009-07-17 Thread Jason Daly
Andrew Burnett-Thompson wrote: Thanks for your reply Jason, I actually worked this out I think, I removed mat-setDiffuse and added mat-setColorMode(osg::Material::ColorMode::DIFFUSE) and it seemed to do the trick! OK, that just makes your Material diffuse color track the vertex colors

Re: [osg-users] Specular Highlight with Vertex Colors?

2009-07-17 Thread Andrew Burnett-Thompson
Yes I was originally adding material plus disabling back-face culling per stateset per Geode, hence the huge saving. Moving the colour to the vertices (one colour bound overall) does the same job as far as I'm concerned and definitely saves on memory/performance :) I'm still having a lot of

[osg-users] Transformations

2009-07-17 Thread Pau Moreno Font
Hi, I'm trying to change my OGL code to OSG but I'm having really problems with the transformations... I have 174 data files that each contains a cloud of points, a vector3 with the translartion, and the matrix of rotation of each cloud. So in OGL, i just do: { LoadFile( x++)

Re: [osg-users] osgText Chopping Letters

2009-07-17 Thread Mark Sciabica
Robert Mike, The disabling of Depth writes is only necessary and useful when the character cells are enlarged. Using the standard osgText implementation the cells don't overlap, but they are not large enough to contain the entire area where each filtered character ought to be drawn.

Re: [osg-users] Transformations

2009-07-17 Thread Ümit Uzun
Hi Paul; So in OSG first of all I try to do it with a osg::Switch but seems that this node accumulate the transformations... is that right? What do you mean about osg::Switch. It's not specific feaute on accumulating trasformation for osg::Switch as I know. It actual target is switching node

Re: [osg-users] osgDB::readNodeFile Thread Safe?

2009-07-17 Thread Robert Osfield
Hi Alex, Most of the plugins are now thread safe, or when they aren't they have a mutex to serialize access to them. In OSG-2.8 onwards the DatabasePager itself is able to use mulitple threads to do reading so it requires the plugins to be thread safe. Robert. On Fri, Jul 17, 2009 at 7:05 PM,

[osg-users] Heading off on a trip, back next Friday

2009-07-17 Thread Robert Osfield
Hi All, Tomorrow morning I'm flying to southern Germany to do some training and consultancy. I should be back home and catching up with submissions and support on next Friday. Please keep testing OSG-2.8.2-rc4 while I'm away :-) Cheers, Robert. ___

Re: [osg-users] Skydome

2009-07-17 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Boris, Attached is a code snippet that moves a simple sky dome model (based on the skydome.osg file) with the eye on a spheroid. The sky dome is centered over the eye. The manipulator viewpoint (eye) is initially positioned on an earth-like spheroid at a given lat/lon/elevation and then you can

[osg-users] Camera Move example

2009-07-17 Thread Danny Lesnik
Hi, Another Nub Q: I'm trying to move my camera forward and backward as the event of up/down key. I created class CameraMover inherited from osgGA::GUIEventHandler. I also have handle function with switch\case: case(osgGA::GUIEventAdapter::KEYDOWN): { switch(ea.getKey())