[osg-users] IVE referenced textures...

2010-12-06 Thread neil.hughes
Hi All,

Sorry to bother you but I have an FLT file that references a number of textures 
via relative paths, and I wish to save this scenegraph as an IVE file, 
maintaining the relative path references to the textures so that the IVE 
doesn't become too large.

When I save the scene graph as an IVE all my textures disappear. Could anyone 
suggest what I might be doing wrong please ?

Thanks for any help.

Kind regards

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3DS loader revisited?

2009-08-21 Thread neil.hughes
Hi Sukender  Robert,

Just to emphasise what has already been said really, but we have literally 10's 
of thousands of 3DS models for various manufacturer's products, so whilst I 
accept there are significant limitations with 3DS structure now compared to 
more modern formats, the sheer size of the back catalogue means it will be 
around for a long time to come. Hence I think support for 3DS is important 
within OSG.

Robert's comments about the 3DS reader supporting streams is vital for us now 
with our web based catalogue viewing system.

In regards to the ability to write a 3DS file, this would be fantastic. If 
help/assistance/testing is wanted I'm sure I'd be able to find some time. If 
you need sample models these could probably be provided as well.

In regards to Collada, my recent excursions into conversions from 3DS to 
collada via osg has had mixed results. Still investigating (when time permits) 
but there is certainly an issue in validity of the collada file produced if the 
node name of the scene graph has spaces, also issues encountered with 
materials. However, these are for another thread. But I tend to agree that even 
with the teething problems, Collada does look to be very powerful.

Is anyone looking at the new Autocad format - FBX? Just wondering whether 
anyone considering a Reader/Writer for it? Looked at trying to take an OSG 
collada file and convert it to FBX via Autocad's converter, but it failed. 

End of memory dump :-)

Kind regards

Neil.



 Robert Osfield robert.osfi...@gmail.com wrote: 
 Hi Sukender,
 
 On Fri, Aug 21, 2009 at 8:35 AM, Sukendersuky0...@free.fr wrote:
  Of course, my goal is to work on the 3DS reader/writer without loosing 
  functionality. Actually, I simply tried to replace the old lib3DS with 
  the new one... and it was very straightforward: some calls were renamed, 
  some others changed a bit...
 
 One areas of significant deviation was for the support of reading from
 istreams, in your work can you still read from istreams?   The ability
 to read from istream enables reading from http via the curl plugin.
 
  Anyway I could load my 3DS models exactly the same way I did before. I 
  could even remove a tiny limitation (meshes were taversed by name, which 
  can be dangerous if two identical names exist. That should not, but now 
  it's okay). Everything worked like a charm! I guess some testing would be a 
  good idea, but it seems there was no functionality loss.
  Side note: I had a few compilation errors using VC9 in the lib3DS, because 
  of implicit conversions from void* to SomethingElse*. I made those 
  conversions explicit and gave the fix to the lib3DS patches tracker.
 
 I had to make a number of changes to fix the pedantic warnings emitted
 by g++ 4.x.  This might need to be rolled in as well.
 
  About linking, I guess putting lib3DS as a static library could be a good 
  idea, even if my testing was with direct inclusion of source files. I'll 
  work on it and submit VC (8? 9?) binaries I guess... or may I keep the 
  files as they are in a first time?
 
 We could possibly just include the source to lib3ds as a subdirectory
 of the 3ds plugin, as CMake allows us to manage the source directories
 better than the old days of trying to support both VS6 and Makefiles.
 
 
  About the writer, well, we have some customers with old software... 
  Moreover they're absolutely not 3D/vis/sim-oriented, so there are few 
  supported formats. I agree 3DS is very poor, but it is a non-flexible 
  format (as some XML-based formats could be); and as a non-flexible format 
  it can be loaded exactly the same way on various (old) software.
  What kind of output format would you use else? Collada?
 
 A major problem with 3ds is that because there is no official/public
 specification and lots of different attempts at implementations the
 files generated can be very patchy in the their consistency.
 
 3ds is not likely to map a general purpose scene graph too well
 either, but this issue applies to most writers - a general purpose
 scene graph is far to flexible to be easily mapped by the constraints
 of most formats.  Collada has to be one of the best for being able to
 map things, but even it is a long way from perfect.
 
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Ask for osgviewerMFC memory consumption explanations

2009-07-21 Thread neil.hughes
Hi Alex,

There could be any number of reasons why this could be happening, and obviously 
some down to coding, however if you are using caching at all, then it maybe 
down to how long you've told the cache to keep the models, even when not used. 
I can't remember what the default is, but if set to never get rid of the 
models, then the only time their memory will be released is when the 
application shuts down - not merely closing and destroying the window. 

This leads on to another reason why you maybe seeing the memory usage you 
report in that, depending on the design of your app architecture, if you leave 
the management of dll's to the O.S., then dll's are only loaded on an 
as-required basis, and are only unloaded when the app shuts down. OSG has a 
number of static memory constructs singletons that are created at dll load 
time, and are not released until dll unload time (app shut down). One  way 
around this is to manage the dll load and unload yourself, however this can be 
very tiresome ;-(

I would suggest that, unless you are witnessing a continual increase in the 
memory allocated to your app, even when you are loading and unloading the same 
model, then I wouldn't be too concerned. Obviously if you are witnessing 
unrestricted memory consumption then something is up, but I suspect not at the 
OSG end.

Finally, in my experience, beware of the false positive memory leaks reported 
by Visual Studio. Plenty of back talk on this in the archives, but suffice it 
to say VS unloads MFC too early in the app shut down process, which triggers a 
dump of unreleased memory warnings. VS crystal ball not working too well as 
when OSG dll's unload - usually after MFC due to VS problem with scheduling 
library loads/unloads - it releases its own memory. Where real leaks actually 
exist, more often than not it can be traced back to app coding errors, or 
inappropriate use of non ref_ptr references to scenegraph entries. I've wasted 
days in the past on this. You can decrease some of the false positives by 
forcing the load of the OSG dll's yourself, but sometimes life is just too 
short to be bothered !

Hope this helps.

Kind regards

Neil.


 Alexandre Amalric alex.pix...@gmail.com wrote: 
 Hi osg-users,
 
 I'm developping an application based on the example osgviewerMFC but I
 don't understand the memory consumption from this example.
 
 1) when I launch osgviewerMFC.exe the memory used is about 10Mo
 2) then I open a model, memory rise to let's say 50Mo (depends on the model)
 3) then I close the window and memory do not get back to 10Mo like desired
 but stay at let say 30Mo (in my case).
 
 Why osgviewerMFC.exe use much memory after opening and closing a model than
 before doing nothing ??
  I am asking this because I have the same behaviour with my own application,
 I suppose something isn't well destroyed when closing a window (removing a
 viewer).
 
 Kind regards,
 -- 
 Alexandre AMALRIC   Ingénieur RD
 ===
 PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
 http://www.pixxim.fr

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[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 definition for the 
corresponding collada item doesn't get its ID attribute changed to have %20. 
The collada file therefore references instances of a geometry as #A%20B but 
the geometry definition has an ID=A B.

Happy to look at fixing this, just wanted to check if anyone else has 
encountered, fixed and submitted. Had a quick look, but couldn't spot any 
submission.

Thanks

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collada (dae) Reader/Writer issue....

2009-07-13 Thread neil.hughes
Hi J-S,

Thanks for getting back to me. I'll look to test this today. I suppose a 
related question would be whether the Collada reader/writer should be amended 
to make use of this explicitly itself? The issue being that given this is a 
graphics driver issue, and our software may be run on hundreds of machines, it 
would be a nice comfort factor to know that this particular problem isn't 
likely to arise.

Many thanks for thoughts and help,

Neil.


 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: 
 Hi Neil,
 
 I'm reordering your questions a bit to make the response more linear :-)
 
  Has anyone considered this already and come up with a really neat solution 
  ? I recognise that coding around driver issues is not ideal, and may not be 
  desireable.
 
 Yes, the osgUtil::Optimizer supports what you want. So you could use one 
 of the osgUtil::Optimizer classes to the work for you (independently of 
 whether your input model was COLLADA or any other format). Optionally 
 you could just call osgconv with the appropriate OSG_OPTIMIZER 
 environment variable on your model. Here are the relevant 
 classes/environment options:
 
  One of the comments I read on the mail archive seemed to imply that in 
  general to  avoid these scaling problems, the model vertices should be 
  scaled directly, and not via matrix operations. 
 
 osgUtil::FlattenStaticTransformsVisitor
 FLATTEN_STATIC_TRANSFORMS
 
  I guess there are some complications here as if differing nodepaths to the 
  same model produce differing scaling factors, the collada export is going 
  to need to write geometry definitions for each of these nodepath scaled 
  model instances.
 
 osgUtil::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor (wow 
 what a mouthful :-)
 FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS
 
 I have never used those myself, but they should work. Let us know how 
 you get on. The Optimizer also has a lot more things it can do to help 
 you optimize your scene graph, so it's worth it to explore the options 
 (osgconv --help-env) and the osgUtil/Optmizer header.
 
 Hope this helps,
 
 J-S
 -- 
 __
 Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
 http://www.cm-labs.com/
  http://whitestar02.webhop.org/
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Collada (dae) Reader/Writer issue....

2009-07-13 Thread neil.hughes
Hi J-S,

I've now had chance to have a look at your suggested optimisations, and I think 
they form the basis of a solution for me, so thanks for that. However there is 
one thing which troubles me a little, which is that the 
FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS optimisation, whilst 
flattening the static scalings, applies those scalings to the normals as well 
as the vertices. Whilst I can understand that this might be desirable for some 
strange effects, would you agree that the normals should at least be normalised 
after this process, else undesirable lighting anomalies can occur?

Neil.


 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: 
 Hi Neil,
 
 I'm reordering your questions a bit to make the response more linear :-)
 
  Has anyone considered this already and come up with a really neat solution 
  ? I recognise that coding around driver issues is not ideal, and may not be 
  desireable.
 
 Yes, the osgUtil::Optimizer supports what you want. So you could use one 
 of the osgUtil::Optimizer classes to the work for you (independently of 
 whether your input model was COLLADA or any other format). Optionally 
 you could just call osgconv with the appropriate OSG_OPTIMIZER 
 environment variable on your model. Here are the relevant 
 classes/environment options:
 
  One of the comments I read on the mail archive seemed to imply that in 
  general to  avoid these scaling problems, the model vertices should be 
  scaled directly, and not via matrix operations. 
 
 osgUtil::FlattenStaticTransformsVisitor
 FLATTEN_STATIC_TRANSFORMS
 
  I guess there are some complications here as if differing nodepaths to the 
  same model produce differing scaling factors, the collada export is going 
  to need to write geometry definitions for each of these nodepath scaled 
  model instances.
 
 osgUtil::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor (wow 
 what a mouthful :-)
 FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS
 
 I have never used those myself, but they should work. Let us know how 
 you get on. The Optimizer also has a lot more things it can do to help 
 you optimize your scene graph, so it's worth it to explore the options 
 (osgconv --help-env) and the osgUtil/Optmizer header.
 
 Hope this helps,
 
 J-S
 -- 
 __
 Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
 http://www.cm-labs.com/
  http://whitestar02.webhop.org/
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Texture object preparation...

2009-06-25 Thread neil.hughes
Hi All,

Is there a way I can get a Texture to perform its preparation at construction 
time, rather than when it is first required for rendering?

Essentially I'm noticing a significant lag on the first frame that requires a 
Texture to be rendered. I've tracked it down to the Texture::apply() where it 
checks to see if it has a textureobject for the contextID. If it doesn't, then 
it goes off and does some work (I presume for sending the texture to the render 
pipeline). This is done once per context per Texture. What I would like to do 
is to take this hit when first constructing the Texture object, rather than 
when flying in space, as it causes a significant lag in frame rate (the 
simulation appears to stagger). 

Does anyone have any suggestions please ?

Many thanks

Neil.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Image file PagedLOD...

2009-06-12 Thread neil.hughes
Hi All,

Has anyone come across a scenario where they wished to have PagedLOD that 
instead of handling Nodes, handle images ?

Essentially I find myself in a position where I have a model that references a 
texture, but that texture is quite large, and even with reducing the texture 
size with little compromise in quality, the time to stream over the web is too 
large. So, what I'm considering is replacing the image load call, with a 
similar concept to that of PagedLOD's whereby I could give the PagedImageLOD 
object a list of ordered image file names that I want it to progressively load 
- in much the same way that apps like google map appears to work. The first 
image file could be a 2x2 pixel image, whilst the nth image file would be the 
full-on image. I would want the PagedImageLOD to return a valid Image node 
immediately - perhaps a hard coded small default image - whilst in the 
background the specified image filesnames are being downloaded, and replace the 
content of the created image node. 

The reason for this sort of functionality would be that I could then intercept 
all image load requests via my own callback handler, replace with a 
PagedImageLOD request, and still permit most plugins to work happily on the 
assumption that a model plugin that loads an image is probably only trying to 
reference that image in some stateset context.

Sorry for the thought dump, but has anyone tried/needed to do a similar thing, 
and if so is there an example available ?

Alternatively, if you can think of a better way that would be good as well. 
Most obvious alternative - that of have an LOD node on the model - would be 
fine if I only had one or two models. However, I have thousands of different 
models, so can't really ask our modellers to redo all these.

Many thanks for any help/thoughts.

Kind regards

Neil.




.to whose content was progressively replaced by the downloaded images. In this 
way I could 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Image file PagedLOD...

2009-06-12 Thread neil.hughes
Thanks Jason, I'll take a look later today.
 Jason Beverage jasonbever...@gmail.com wrote: 
 Hi Neil,
 
 The osgEarth project does essentially what you are looking for.  Check it
 out at http://www.osgearth.org
 
 Thanks,
 
 Jason
 
 On Fri, Jun 12, 2009 at 5:08 AM, neil.hug...@tesco.net wrote:
 
  Hi All,
 
  Has anyone come across a scenario where they wished to have PagedLOD that
  instead of handling Nodes, handle images ?
 
  Essentially I find myself in a position where I have a model that
  references a texture, but that texture is quite large, and even with
  reducing the texture size with little compromise in quality, the time to
  stream over the web is too large. So, what I'm considering is replacing the
  image load call, with a similar concept to that of PagedLOD's whereby I
  could give the PagedImageLOD object a list of ordered image file names
  that I want it to progressively load - in much the same way that apps like
  google map appears to work. The first image file could be a 2x2 pixel image,
  whilst the nth image file would be the full-on image. I would want the
  PagedImageLOD to return a valid Image node immediately - perhaps a hard
  coded small default image - whilst in the background the specified image
  filesnames are being downloaded, and replace the content of the created
  image node.
 
  The reason for this sort of functionality would be that I could then
  intercept all image load requests via my own callback handler, replace with
  a PagedImageLOD request, and still permit most plugins to work happily on
  the assumption that a model plugin that loads an image is probably only
  trying to reference that image in some stateset context.
 
  Sorry for the thought dump, but has anyone tried/needed to do a similar
  thing, and if so is there an example available ?
 
  Alternatively, if you can think of a better way that would be good as well.
  Most obvious alternative - that of have an LOD node on the model - would be
  fine if I only had one or two models. However, I have thousands of different
  models, so can't really ask our modellers to redo all these.
 
  Many thanks for any help/thoughts.
 
  Kind regards
 
  Neil.
 
 
 
 
  .to whose content was progressively replaced by the downloaded images. In
  this way I could
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] PluginStrData....

2009-05-27 Thread neil.hughes
Hi Robert,

I hope you're over your cold/flu now?

I'm looking at the PluginStrData work , and wondered whether you think the 
setPluginStrData and getPluginStrData should be made case insensitive? I was 
thinking to force the 'set' parameters through the osgDB::convertToLowerCase 
function. It would make checking for specific option string settings a little 
cleaner, and more robust.

Neil
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Regression in .zip loader?

2009-05-25 Thread neil.hughes
Hi Ulrich  Robert,

I've just done a cursory scan of the code again, and can't quite see what could 
be going wrong. However, I do note that the GetZipItem function can return an 
error state that the code isn't checking for. I'll try and have a look at it 
tomorrow, and set up a similar example for a 3ds node and a jpeg, and see 
what's happening there. However I would note in passing that I tested with a 
zip file that contained four 3ds models all zipped within the same file, and 
these worked file.

Ulrich, could you send me an example zip file that causes this issue please? If 
you could exclude .x as I don't regularly deal with this format. 
3ds/osg/ive/flt/jpg/tga would be fine if possible please. I could then 
investigate with a little more certainty that the example fails on your setup. 
Many thanks,

Neil.



 Ulrich Hertlein u.hertl...@sandbox.de wrote: 
 Hi Robert,
 
 On 25/5/09 10:24 AM, Robert Osfield wrote:
  On Sun, May 24, 2009 at 6:00 PM, Ulrich Hertleinu.hertl...@sandbox.de  
  wrote:
  have there been any recent changes in the .zip loader?  I just noticed that
  I can no longer load a bunch of zipped .x files.  OSG_NOTIFY_LEVEL=DEBUG
  shows that all plugins are found (.zip, .x, .bmp) but I still get 'No data
  loaded' from osgviewer.
 
  If I unpack the .zip file and load the .x directly everything is fine.
 
  Arggh two steps forward, one back...
 
  As Neil mentioned I'ved merged his changes to the zip plugin to allow
  in memory unpacking, and it then use istreams to read the final modes,
  and it looks like the .x plugin doesn't support reading from streams
  yet.
  ...
   handle models zipped up and placed on http.  The ideal solution would
   be to add streams support into .x plugin and any others that it's
   missing for.
 
 I've added stream support to the .x plugin but the problem is deeper than 
 that.
 
 It seems like there's a serious bug in the zip loader.  If there are multiple 
 files in the 
 archive only the first one is read properly.  All the following ones are fed 
 the same 
 data.  So for example if you have a .zip that contains a .jpg and an .ive the 
 JPEG is read 
 properly but then the JPEG data is fed to the .ive plugin which of course 
 doesn't work.
 
 If the .ive is first then that is loaded and displayed but any following file 
 is not read 
 properly.
 
 Cheers,
 /ulrich
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Regression in .zip loader?

2009-05-24 Thread neil.hughes
Hi Ulrich,

If you've taken the recent trunk checkins, then the answer is yes, there have 
been some recent changes to the .zip loader. However, I had hoped that there 
would be no downsides to the amendments made. Essentially, where as previously 
the expansion of the .zip file was performed to the local filing system - ie 
your hard disk - now the unpacking process is all done in memory.

There were some issues in getting the modification to compile on unix boxes, 
but I believe Robert solved that, and another maillist member made a 
modification to get it to compile on Mac's. So I thought it was all working.

One issue that may now arise, and something that Robert and I are pondering, is 
where a model references a texture contained within the same zip file. At the 
moment, using the in-memory unpacking, this is not supported. Essentially we 
need to figure out how to use the .zip as an archive that can be interrogated 
for files during a model load operation. Hopefully Robert or I will have 
something on this in the near future. 

Until then...you could rename the original_readnode function in the .zip plugin 
to replace the new readnode (this would put you back to unpacking to the local 
file system). I understand that Robert is offline for a few days with a nasty 
cold/flu, but when he's back, we could look to make an amendment to provide an 
options switch to control which unpacking method is used. I may submit this 
anyway, and leave it to Robert to decide on acceptance.

Hope the info helps, and sorry for any inconvenience that the amendment may 
have caused.

Kind regards

Neil.


 Ulrich Hertlein u.hertl...@sandbox.de wrote: 
 Hi all,
 
 have there been any recent changes in the .zip loader?  I just noticed that I 
 can no 
 longer load a bunch of zipped .x files.  OSG_NOTIFY_LEVEL=DEBUG shows that 
 all plugins are 
 found (.zip, .x, .bmp) but I still get 'No data loaded' from osgviewer.
 
 If I unpack the .zip file and load the .x directly everything is fine.
 
 Cheers,
 /ulrich
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Taking it easy for a couple of days

2009-05-13 Thread neil.hughes
Hi Robert,

Hope you get well soon. 

Coincidently, this article appeared on the bbc today. So manflu does exist :-)

http://news.bbc.co.uk/1/hi/health/8047321.stm

Kind regards

Neil.



 Robert Osfield robert.osfi...@gmail.com wrote: 
 Hi All,
 
 I've gone down with a bad cold, so am struggling to focus, read and
 think clearly today.  So... please don't expect much support from me
 today, some active threads will just have do without my contribution
 for a couple of days.
 
 Luckily human virus can't be transmitted by email/forums just yet.
 
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Change cursor with object under mouse

2009-05-06 Thread neil.hughes
Hi Romain,

The way I did this was with a custom PickHandler. If you look at the 
PickHandler example - I think its the scribeFX one - you basically get the 
mouse events coming in. It gives you an opportunity to do your line 
intersections to determine the object under the mouse, at which point you can 
decide what cursor you wish to change to. 

Hope this helps.

Neil.


 Romain Charbit romain.char...@gmail.com wrote: 
 Hi,
 
 May I ask your guidance for a problem that I have.
 
 I want to change the cursor of the mouse in function of the object that is 
 under of it. Example, when I'm passing the mouse over a dragger, I want to 
 change the cursor to a Hand.
 
 I'm on the detection of the object for the moment. I'm using a handler which 
 use a LineSegmentIntersector on every frame. It works but it's kind of slow.
 
 I've seen on the web about the GL_SELECT OpenGL renderMode which has been 
 design for it. But I've also seen that it's not a good way to do that. 
 
 Maybe someone has already done something like this or has an idea about it?
 
 
 Thank you!
 
 Cheers,
 
 Romain Charbit
 
 
 Romain Charbit
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=11520#11520
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] The mystery of the Disappearing Texture....

2009-05-05 Thread neil.hughes
Hi All,

I have an application that employs OSG in a window. I load a scene with 
textures and everything is fine. If I move the window to a different screen, 
the textures disappear ! I move the window back to the original screen, the 
textures reappear. Back-and-forth my window goes from screen to screen and the 
textures flash on and off accordingly. 

Clearly I've forgotten to do something, but I can't see what. 

Could someone shed some light on this please. Hair loss is increasing by the 
minute ;-(

Thanks in advance.

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] The mystery of the Disappearing Texture....

2009-05-05 Thread neil.hughes
Hi Robert,

Thanks for the info.  Guess I'll stick to one monitor for the moment ;-(

Neil.

 Robert Osfield robert.osfi...@gmail.com wrote: 
 Hi Neil,
 
 This will be a driver dependent issue, the driver/OS managing graphics
 contexts behind the scenes for you, but not doing it 100% correctly.
 
 Personally I much prefer window managers/drivers that don't attempt to
 be clever on your behalf, and just done allow such windows to be
 dragged unless they are shared on the same graphics card and with the
 same display properties as the tricks involved with duplicating
 contexts behind the scenes is both wasteful of resources and
 performance and driver complexity.
 
 Best thing you an do is try to update your drivers.
 
 Robert.
 
 On Tue, May 5, 2009 at 11:42 AM,  neil.hug...@tesco.net wrote:
  Hi All,
 
  I have an application that employs OSG in a window. I load a scene with 
  textures and everything is fine. If I move the window to a different 
  screen, the textures disappear ! I move the window back to the original 
  screen, the textures reappear. Back-and-forth my window goes from screen to 
  screen and the textures flash on and off accordingly.
 
  Clearly I've forgotten to do something, but I can't see what.
 
  Could someone shed some light on this please. Hair loss is increasing by 
  the minute ;-(
 
  Thanks in advance.
 
  Neil.
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] custom search paths...

2009-05-01 Thread neil.hughes
Hi Robert,

Thanks for the reply, I'll look into this approach.

Neil.


 Robert Osfield robert.osfi...@gmail.com wrote: 
 Hi Neil,
 
 The ReaderWriter::Options structure has a data file path list built
 into it, this is checked before the main data file path list stored in
 the Registry is checked.   So if you want a certainly directory
 checked just put it on your path, either via the ReaderWriter::Options
 or via the Registry using osgDB::s/getDataFilePathList.  You'd
 typically use Options when you only want to locally set the search
 path.
 
 Robert.
 
 On Thu, Apr 30, 2009 at 5:29 PM,  neil.hug...@tesco.net wrote:
  Hi All,
 
  I'd like to pick your collective brains for a moment in regards to search 
  paths for files within OSG. I'm currently working on the 3DS plugin for 
  OSG, looking at a little problem. The scenario is as follows.
 
  I have a 3DS file whose material table references a texture. When this 
  model was created the texture resided in the same directory as the model, 
  and hence no path information was stored - at least I guess that's why 
  there is no path information for the texture referenced. Now when I want to 
  load this model, the 3DS loader tries to locate the texture in the 
  directory that the model resides in - using the findfileindirectory 
  function - but as the texture is no longer in this directory, the function 
  fails to find the file, and the 3DS reader decides not to put a texture on 
  the geometry.
 
  Now, the thing is, I do know where the texture is relative to the model. 
  Its in a parallel directory. In fact, if I ignore the result of the find 
  file, and merely just try and load the image, my readfilecallback handler 
  amends the path to the file, and the image loads.
 
  So, what I was wondering was whether there already exists a way by which I 
  can direct the findfileindirectory function to take account of a custom 
  search algorithm? I've had a look and I can't spot one, but wondered if 
  others might know differently?
 
  On the assumption that no such methodology exists, my thoughts were that I 
  could amend the existing function to call a custom defined function on the 
  user supplied readfilecallback - if one has been supplied - in the event 
  where the readfileindirectory function has failed.
 
  Any thoughts ?
 
  Thanks for any assistance/comments.
 
  Kind regards,
 
  Neil.
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] custom search paths...

2009-05-01 Thread neil.hughes
Hi Robert,

I've had a look at this, and whilst it will address the specific scenario I 
described, I left out a little top spin to the scenario that has some bearing 
on the issue. Not only do I want to specify the directory where the search 
looks, but I also wish to amend the file extension. Essentially the issue is 
that when we originally started out modelling - circa 10 years ago now - we 
only used TGA files. Now we tend to prefer to load jpg files, unless there is 
an alpha channel in which case we'll load TGA's. For space reasons, and speed 
of load/download we therefore want to say that if a tga file is referenced, try 
loading, but if not found, try the jpg equivalent.

I can handle this at the load image time within my supplied readfilecallback, 
if I circumvent the search results. However, I'd like the search routines to be 
able to handle this type of functionality as well. i.e. I request Pear.TGA, the 
search try's to locate it, but if it fails it tries some alternative extensions.

Now I recognise that this is somewhat specific to myself, but rather than have 
customised 3DS readers, I was hoping to extend the search routines in a general 
way to permit an application to supply its own search algorithm, that could be 
used in the event that the file was not found with the current search 
implementations.  I recognise that for the majority of people either the 
standard search path, or the options route you describe, is sufficient. Its 
just that I can't see a way to amend the extension/path according to some 
application defined rules using this approach.

Robert, I think I'll code up a solution, and perhaps submit it for 
consideration if that's ok with you, and then we'll have a framework to bat 
about.

Kind regards

Neil.





 a jpgour models were producedmodelled, 






 neil.hug...@tesco.net wrote: 
 Hi Robert,
 
 Thanks for the reply, I'll look into this approach.
 
 Neil.
 
 
  Robert Osfield robert.osfi...@gmail.com wrote: 
  Hi Neil,
  
  The ReaderWriter::Options structure has a data file path list built
  into it, this is checked before the main data file path list stored in
  the Registry is checked.   So if you want a certainly directory
  checked just put it on your path, either via the ReaderWriter::Options
  or via the Registry using osgDB::s/getDataFilePathList.  You'd
  typically use Options when you only want to locally set the search
  path.
  
  Robert.
  
  On Thu, Apr 30, 2009 at 5:29 PM,  neil.hug...@tesco.net wrote:
   Hi All,
  
   I'd like to pick your collective brains for a moment in regards to search 
   paths for files within OSG. I'm currently working on the 3DS plugin for 
   OSG, looking at a little problem. The scenario is as follows.
  
   I have a 3DS file whose material table references a texture. When this 
   model was created the texture resided in the same directory as the model, 
   and hence no path information was stored - at least I guess that's why 
   there is no path information for the texture referenced. Now when I want 
   to load this model, the 3DS loader tries to locate the texture in the 
   directory that the model resides in - using the findfileindirectory 
   function - but as the texture is no longer in this directory, the 
   function fails to find the file, and the 3DS reader decides not to put a 
   texture on the geometry.
  
   Now, the thing is, I do know where the texture is relative to the model. 
   Its in a parallel directory. In fact, if I ignore the result of the find 
   file, and merely just try and load the image, my readfilecallback handler 
   amends the path to the file, and the image loads.
  
   So, what I was wondering was whether there already exists a way by which 
   I can direct the findfileindirectory function to take account of a 
   custom search algorithm? I've had a look and I can't spot one, but 
   wondered if others might know differently?
  
   On the assumption that no such methodology exists, my thoughts were that 
   I could amend the existing function to call a custom defined function on 
   the user supplied readfilecallback - if one has been supplied - in the 
   event where the readfileindirectory function has failed.
  
   Any thoughts ?
  
   Thanks for any assistance/comments.
  
   Kind regards,
  
   Neil.
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
   http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org

Re: [osg-users] custom search paths...

2009-05-01 Thread neil.hughes
Hi Robert,

I suspect we may be saying the same thing, and perhaps I haven't explained 
myself clearly. All I'm suggesting is a slight amendment to the search 
functions to delegate to an application supplied readfilecallback the role of 
searching when the default search has failed to locate the file. OSG would be 
agnostic as far as the actual alternative search algorithm is concerned. It 
merely invokes it and returns the result.  

Neil.


 Robert Osfield robert.osfi...@gmail.com wrote: 
 Hi Neil,
 
 This type of customization is exactly what ReadFileCallback is for.  I
 don't feel it's appropriate for search routines to do anything other
 than search, having them remap file names is inappropriate.
 
 Robert.
 
 On Fri, May 1, 2009 at 11:32 AM,  neil.hug...@tesco.net wrote:
  Hi Robert,
 
  I've had a look at this, and whilst it will address the specific scenario I 
  described, I left out a little top spin to the scenario that has some 
  bearing on the issue. Not only do I want to specify the directory where the 
  search looks, but I also wish to amend the file extension. Essentially the 
  issue is that when we originally started out modelling - circa 10 years ago 
  now - we only used TGA files. Now we tend to prefer to load jpg files, 
  unless there is an alpha channel in which case we'll load TGA's. For space 
  reasons, and speed of load/download we therefore want to say that if a tga 
  file is referenced, try loading, but if not found, try the jpg equivalent.
 
  I can handle this at the load image time within my supplied 
  readfilecallback, if I circumvent the search results. However, I'd like the 
  search routines to be able to handle this type of functionality as well. 
  i.e. I request Pear.TGA, the search try's to locate it, but if it fails it 
  tries some alternative extensions.
 
  Now I recognise that this is somewhat specific to myself, but rather than 
  have customised 3DS readers, I was hoping to extend the search routines in 
  a general way to permit an application to supply its own search algorithm, 
  that could be used in the event that the file was not found with the 
  current search implementations.  I recognise that for the majority of 
  people either the standard search path, or the options route you describe, 
  is sufficient. Its just that I can't see a way to amend the extension/path 
  according to some application defined rules using this approach.
 
  Robert, I think I'll code up a solution, and perhaps submit it for 
  consideration if that's ok with you, and then we'll have a framework to bat 
  about.
 
  Kind regards
 
  Neil.
 
 
 
 
 
   a jpgour models were producedmodelled,
 
 
 
 
 
 
   neil.hug...@tesco.net wrote:
  Hi Robert,
 
  Thanks for the reply, I'll look into this approach.
 
  Neil.
 
 
   Robert Osfield robert.osfi...@gmail.com wrote:
   Hi Neil,
  
   The ReaderWriter::Options structure has a data file path list built
   into it, this is checked before the main data file path list stored in
   the Registry is checked.   So if you want a certainly directory
   checked just put it on your path, either via the ReaderWriter::Options
   or via the Registry using osgDB::s/getDataFilePathList.  You'd
   typically use Options when you only want to locally set the search
   path.
  
   Robert.
  
   On Thu, Apr 30, 2009 at 5:29 PM,  neil.hug...@tesco.net wrote:
Hi All,
   
I'd like to pick your collective brains for a moment in regards to 
search paths for files within OSG. I'm currently working on the 3DS 
plugin for OSG, looking at a little problem. The scenario is as 
follows.
   
I have a 3DS file whose material table references a texture. When this 
model was created the texture resided in the same directory as the 
model, and hence no path information was stored - at least I guess 
that's why there is no path information for the texture referenced. 
Now when I want to load this model, the 3DS loader tries to locate the 
texture in the directory that the model resides in - using the 
findfileindirectory function - but as the texture is no longer in this 
directory, the function fails to find the file, and the 3DS reader 
decides not to put a texture on the geometry.
   
Now, the thing is, I do know where the texture is relative to the 
model. Its in a parallel directory. In fact, if I ignore the result of 
the find file, and merely just try and load the image, my 
readfilecallback handler amends the path to the file, and the image 
loads.
   
So, what I was wondering was whether there already exists a way by 
which I can direct the findfileindirectory function to take account 
of a custom search algorithm? I've had a look and I can't spot one, 
but wondered if others might know differently?
   
On the assumption that no such methodology exists, my thoughts were 
that I could amend the existing function to call a custom defined 

[osg-users] Cache system...

2009-04-17 Thread neil.hughes
Hi All,

I'm looking for some thoughts, and advice, on the cache process within OSG. 
Essentially a while ago (OSG1.2) I wrote an app that implemented its own 
node/texture cache in memory as I didn't want to be writing things to the file 
system as permissions were potentially a problem. I'm now looking at rewriting 
in OSG2.8, and trying to get a handle on whether the cacheing offered by OSG 
has changed at all. Essentially I want to cache objects in a memory cache, 
rather than to file. As far as I can see this isn't an option within OSG2.8, 
but I wanted to check if others new anything to the contrary ?

Thanks for any help/comments.

Neil.



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Cache system...

2009-04-17 Thread neil.hughes
Hi All,

I'm looking for some thoughts, and advice, on the cache process within OSG. 
Essentially a while ago (OSG1.2) I wrote an app that implemented its own 
node/texture cache in memory as I didn't want to be writing things to the file 
system as permissions were potentially a problem. I'm now looking at rewriting 
in OSG2.8, and trying to get a handle on whether the cacheing offered by OSG 
has changed at all. Essentially I want to cache objects in a memory cache, 
rather than to file. As far as I can see this isn't an option within OSG2.8, 
but I wanted to check if others new anything to the contrary ?

Thanks for any help/comments.

Neil.



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Cache system...

2009-04-17 Thread neil.hughes
Hi Stephan,

Thanks for coming back to me. 

I think I confused myself with the filecache concept. thanks for the hint. I've 
now tracked through and found out what is happening, so it looks like I don't 
need to implement my own cache, which is great.

Thanks again.

neil.


 Stephan Maximilian Huber ratzf...@digitalmind.de wrote: 
 Hi neil,
 
 neil.hug...@tesco.net schrieb:
  Hi All,
  
  I'm looking for some thoughts, and advice, on the cache process within OSG. 
  Essentially a while ago (OSG1.2) I wrote an app that implemented its own 
  node/texture cache in memory as I didn't want to be writing things to the 
  file system as permissions were potentially a problem. I'm now looking at 
  rewriting in OSG2.8, and trying to get a handle on whether the cacheing 
  offered by OSG has changed at all. Essentially I want to cache objects in a 
  memory cache, rather than to file. As far as I can see this isn't an option 
  within OSG2.8, but I wanted to check if others new anything to the contrary 
  ?
  
  Thanks for any help/comments.
 
 Have you tried the internal cache of osg? I think it defaults to off, so
 you have to switch it on via:
 
 osgDB::ReaderWriter::Options* options = new osgDB::ReaderWriter::Options();
 options-setObjectCacheHint(osgDB::ReaderWriter::CACHE_ALL);
 
 osgDB::Registry::instance()-setOptions(options);
 
 For more infos see the documentation of osgDB::ReaderWriter::Options
 
 HTH,
 Stephan
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] ObjectType querry...

2009-04-02 Thread neil.hughes
Hi Robert,

Please ignor last email, and this request. I've just realised what to do. Put 
it down to temporary moment of insanity on my part.

Thanks for help.

Neil.

 neil.hug...@tesco.net wrote: 
 Hi Robert,
 
 Thanks for coming back to me so quickly, however I don't think I made myself 
 clear enough, as I'm not sure that osgconv is what I'm looking for. I'm 
 sitting within the zip plugin code, and I have the stream of bytes that 
 represents one of the files within the zip file. I need to know whether I 
 should be passing this stream into a ReadImage, readNode, readObject, or 
 readArchive function - like the Curl plugin does. Now, I can get the 
 appropriate reader as the registry provides functions for doing that. What I 
 need to know, within code, is what type of object that stream represents, so 
 that I can call the appropriate function within the plugin code at runtime. 
 
 I was hoping that a plugin might publish the type of object it creates via a 
 call, but I've looked at the plugin codes and all that is really available 
 seems to be the extensions that a reader addresses, and not the type of 
 object it returns.
 
 So, for example, I would like the JPG,TGA,BMP,PNG...(A.N.Other image format) 
 plugins to return IMAGE as the object type they create creates, whilst the 
 OSG, 3DS, FLT, IVE and (A.N.Other object format) would return node.
 
 Any thoughts ?
 
 Thanks in advance.
 
 Neil.
 
 
 
 
 
 
 
  Robert Osfield robert.osfi...@gmail.com wrote: 
  Hi Neil,
  
  In OSG-2.8 you can do osgconv --formats to get a listed of all the
  capabilities of the plugins.
  
  Robert.
  
  On Wed, Apr 1, 2009 at 5:29 PM, neil.hug...@tesco.net wrote:
  
   Hi All,
  
   Can anyone tell me whether there is a way (call) in OSG to say what type 
   of
   object a plugin will produce ? i.e. if I have a file A.jpg and I call
   osgDB::Registry::instance()-getReaderWriterForExtension passing in the 
   file
   extension, I get the readerwriter. What I would like to know is what
   ObjectType that readerwrite would return.
  
   The reason for the question is I'm updating the ReaderWriterZip plugin to
   handle in-memory zip extraction, and I want to be able to give it a zip 
   file
   that contains many files of varying format. Rippling through the zip file 
   I
   can get the individual files, and their content, and unzip them in memory,
   but the issue I have is that I don't really want to have a big If 
   statement
   in the plugin to look at the known file extensions and to say whether I
   should be calling ReadNode or ReadImage. I would like to be able to 
   enquire
   the type of Object that the reader would produce, and then have a simple
   switch statement like the Curl plugin.
  
   One route I thought of would be to add to extend each plugin to have a
   function based that returns the type of object, and I guess this would be
   fairly straight forward, but before delving in, I just wanted to check if
   there is a method already available.
  
   Many thanks for any help.
  
   Neil.
  
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
   http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] ObjectType querry...

2009-04-01 Thread neil.hughes
Hi All,

Can anyone tell me whether there is a way (call) in OSG to say what type of 
object a plugin will produce ? i.e. if I have a file A.jpg and I call 
osgDB::Registry::instance()-getReaderWriterForExtension passing in the file 
extension, I get the readerwriter. What I would like to know is what ObjectType 
that readerwrite would return.

The reason for the question is I'm updating the ReaderWriterZip plugin to 
handle in-memory zip extraction, and I want to be able to give it a zip file 
that contains many files of varying format. Rippling through the zip file I can 
get the individual files, and their content, and unzip them in memory, but the 
issue I have is that I don't really want to have a big If statement in the 
plugin to look at the known file extensions and to say whether I should be 
calling ReadNode or ReadImage. I would like to be able to enquire the type of 
Object that the reader would produce, and then have a simple switch statement 
like the Curl plugin.

One route I thought of would be to add to extend each plugin to have a function 
based that returns the type of object, and I guess this would be fairly 
straight forward, but before delving in, I just wanted to check if there is a 
method already available.

Many thanks for any help.

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] SetAttribute crash...

2009-03-23 Thread neil.hughes
Hi All,

I have a standalone windows application (MDI) that embeds OSG in a window, 
loads an object, applies a texture, and displays the object for viewing. This 
works fine. No problems at all.

I've also got a more complicated ActiveX control that does the same sort of 
thing, and this works fine as a release build running on an XP platform. 
However, when I move the ActiveX control to a Vista box, I get a crash in the 
Release build when trying to call setTextureAttributeAndModes on the stateset 
object of the drawable for my 3D object.

In an attempt to identify what's happening, I've recompiled OSG (I should say 
OSG1.2, sorry) with a few protected: classifications removed so that I can look 
at the values a bit easier, and step into some code. Having done this, it looks 
like when the setAttribute function is eventually called from 
setTextureAttributeAndModes, as soon as it executes the line

itr-second.first = attribute;

the system dies a horrible death, taking down the web browser in which the 
activeX control is running. Looking at the call stack it seems to be occuring 
when trying to clean up the dereferencing of the previously assigned texture 
(this was assigned as part of the 3DS load operation).

I can't believe that its the OSG code as such as the standalone version runs 
fine, however I was wondering whether anyone else has had a similar issue, and 
if so, could you give any tips as to what might be going wrong?

Many thanks for any help.

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] SetAttribute crash...

2009-03-23 Thread neil.hughes
Hi All,

I have a standalone windows application (MDI) that embeds OSG in a window, 
loads an object, applies a texture, and displays the object for viewing. This 
works fine. No problems at all.

I've also got a more complicated ActiveX control that does the same sort of 
thing, and this works fine as a release build running on an XP platform. 
However, when I move the ActiveX control to a Vista box, I get a crash in the 
Release build when trying to call setTextureAttributeAndModes on the stateset 
object of the drawable for my 3D object.

In an attempt to identify what's happening, I've recompiled OSG (I should say 
OSG1.2, sorry) with a few protected: classifications removed so that I can look 
at the values a bit easier, and step into some code. Having done this, it looks 
like when the setAttribute function is eventually called from 
setTextureAttributeAndModes, as soon as it executes the line

itr-second.first = attribute;

the system dies a horrible death, taking down the web browser in which the 
activeX control is running. Looking at the call stack it seems to be occuring 
when trying to clean up the dereferencing of the previously assigned texture 
(this was assigned as part of the 3DS load operation).

I can't believe that its the OSG code as such as the standalone version runs 
fine, however I was wondering whether anyone else has had a similar issue, and 
if so, could you give any tips as to what might be going wrong?

Many thanks for any help.

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] SetAttribute crash...

2009-03-23 Thread neil.hughes
Hi All,

I have a standalone windows application (MDI) that embeds OSG in a window, 
loads an object, applies a texture, and displays the object for viewing. This 
works fine. No problems at all.

I've also got a more complicated ActiveX control that does the same sort of 
thing, and this works fine as a release build running on an XP platform. 
However, when I move the ActiveX control to a Vista box, I get a crash in the 
Release build when trying to call setTextureAttributeAndModes on the stateset 
object of the drawable for my 3D object.

In an attempt to identify what's happening, I've recompiled OSG (I should say 
OSG1.2, sorry) with a few protected: classifications removed so that I can look 
at the values a bit easier, and step into some code. Having done this, it looks 
like when the setAttribute function is eventually called from 
setTextureAttributeAndModes, as soon as it executes the line

itr-second.first = attribute;

the system dies a horrible death, taking down the web browser in which the 
activeX control is running. Looking at the call stack it seems to be occuring 
when trying to clean up the dereferencing of the previously assigned texture 
(this was assigned as part of the 3DS load operation).

I can't believe that its the OSG code as such as the standalone version runs 
fine, however I was wondering whether anyone else has had a similar issue, and 
if so, could you give any tips as to what might be going wrong?

Many thanks for any help.

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] SetAttribute crash...

2009-03-23 Thread neil.hughes
Hi All,

Email client going wrong again. Seems like three instances of message sent. 
Sorry.

Neil.

 neil.hug...@tesco.net wrote: 
 Hi All,
 
 I have a standalone windows application (MDI) that embeds OSG in a window, 
 loads an object, applies a texture, and displays the object for viewing. This 
 works fine. No problems at all.
 
 I've also got a more complicated ActiveX control that does the same sort of 
 thing, and this works fine as a release build running on an XP platform. 
 However, when I move the ActiveX control to a Vista box, I get a crash in the 
 Release build when trying to call setTextureAttributeAndModes on the stateset 
 object of the drawable for my 3D object.
 
 In an attempt to identify what's happening, I've recompiled OSG (I should say 
 OSG1.2, sorry) with a few protected: classifications removed so that I can 
 look at the values a bit easier, and step into some code. Having done this, 
 it looks like when the setAttribute function is eventually called from 
 setTextureAttributeAndModes, as soon as it executes the line
 
 itr-second.first = attribute;
 
 the system dies a horrible death, taking down the web browser in which the 
 activeX control is running. Looking at the call stack it seems to be occuring 
 when trying to clean up the dereferencing of the previously assigned texture 
 (this was assigned as part of the 3DS load operation).
 
 I can't believe that its the OSG code as such as the standalone version runs 
 fine, however I was wondering whether anyone else has had a similar issue, 
 and if so, could you give any tips as to what might be going wrong?
 
 Many thanks for any help.
 
 Neil.
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] SetAttribute crash...

2009-03-23 Thread neil.hughes
Hi robert

thanks for the response. 

I sense the bullet heading my way ;-(

will ponder a little longer.

Neil.

 Robert Osfield robert.osfi...@gmail.com wrote: 
 Hi Neil,
 
 The best thing you could look at is to check that the object you are trying
 to set is a valid object, and hasn't been deleted.  Beyond this I don't
 think there is much we could do to help.
 
 And as gentle, perhaps it's time to updated to OSG-2.8, as it time passes it
 become increasingly difficult to support OSG-1.2 users as the knowledge of
 this old rev is a bit of distant memory for most of us.  If you want to use
 these old rev's then you'll need to increasingly take responsibility for
 support of it, or... just bite the bullet and upgrade, it needn't be a
 difficult experience.
 
 Robert.
 
 On Mon, Mar 23, 2009 at 9:59 AM, neil.hug...@tesco.net wrote:
 
  Hi All,
 
  I have a standalone windows application (MDI) that embeds OSG in a window,
  loads an object, applies a texture, and displays the object for viewing.
  This works fine. No problems at all.
 
  I've also got a more complicated ActiveX control that does the same sort of
  thing, and this works fine as a release build running on an XP platform.
  However, when I move the ActiveX control to a Vista box, I get a crash in
  the Release build when trying to call setTextureAttributeAndModes on the
  stateset object of the drawable for my 3D object.
 
  In an attempt to identify what's happening, I've recompiled OSG (I should
  say OSG1.2, sorry) with a few protected: classifications removed so that I
  can look at the values a bit easier, and step into some code. Having done
  this, it looks like when the setAttribute function is eventually called from
  setTextureAttributeAndModes, as soon as it executes the line
 
  itr-second.first = attribute;
 
  the system dies a horrible death, taking down the web browser in which the
  activeX control is running. Looking at the call stack it seems to be
  occuring when trying to clean up the dereferencing of the previously
  assigned texture (this was assigned as part of the 3DS load operation).
 
  I can't believe that its the OSG code as such as the standalone version
  runs fine, however I was wondering whether anyone else has had a similar
  issue, and if so, could you give any tips as to what might be going wrong?
 
  Many thanks for any help.
 
  Neil.
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PNG not displaying correctly..

2009-03-02 Thread neil.hughes
Hi Paul,

That worked fine. 

I shall investigate further.

Thanks for the help

Neil.



 Paul Martz pma...@skew-matrix.com wrote: 
 Try osgviewer --image filename and see if you get different results.
 
 Paul Martz
 Skew Matrix Software LLC
 http://www.skew-matrix.com
 +1 303 859 9466
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PNG not displaying correctly..

2009-03-02 Thread neil.hughes
Hi Stephan,

I'm not sure. I shall investigate further.

Paul's suggestion has demonstrated that the osgviewer displays the png 
correctly, so I guess that, coupled with you suggestion, gives me a good 
starting point for  investigating what's wrong at my end.

Many thanks.

Neil



 Stephan Maximilian Huber ratzf...@digitalmind.de wrote: 
 neil.hug...@tesco.net schrieb:
  Hi All,
  
  Please find attached a png file that has a purple circle, black boarder, 
  and an alpha channel. I'm using OSG1.2, and trying to read it in via the 
  png pluggin, and apply it to an object. The PNG loads, but the alpha 
  channel is being ignored, and I get solid white instead of the underlying 
  object color/texture. 
  
  Please could someone tell me is there something wrong with the png file, 
  the reader, or am I doing something that's not possible.
  
  Many thanks for any help.
 
 there was no attachment.
 
 Have you enabled GL_BLEND for your geometry?
 
 node-getOrCreateStateSet()-setMode(GL_BLEND, osg::StateAttribute::ON);
 
 
 cheers,
 Stephan
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] PNG not displaying correctly..

2009-02-27 Thread neil.hughes
Hi All,

Please find attached a png file that has a purple circle, black boarder, and an 
alpha channel. I'm using OSG1.2, and trying to read it in via the png pluggin, 
and apply it to an object. The PNG loads, but the alpha channel is being 
ignored, and I get solid white instead of the underlying object color/texture. 

Please could someone tell me is there something wrong with the png file, the 
reader, or am I doing something that's not possible.

Many thanks for any help.

Kind regards

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] memory leak false positives on Windows

2009-02-11 Thread neil.hughes
Hi All,

As a simple user of OSG in a Microsoft VS environment, I would like to say that 
this one issue is the most frustrating concern I have about continuing to use 
OSG. I recognise that for those who don't use Microsoft VS the problem doesn't 
occur, but, for a large proportion of OSG users, I suspect, this is an on going 
problem that they, like I, encounter every single day.

I note that recently the OSG pages were updated to welcome over 2000 
subscribers/users to the mailing list. I think that's wonderful, but I can't 
help thinking that as that number grows, more and more will be developers on a 
Micrsoft platform, and whose first attempts at using OSG are going to be 
plagued with false positive memory leaks. I can't see this as a good advert for 
the product - which I happen to think is seriously good.

It appears that whenever this issue is raised, readers are directed to the 
archives to read up on the discussions, only to come away with the conclusion 
that we as programmers are being told that to fix the issue we really need to 
invest in a piece of software that doesn't fall fowl of this problem. However, 
I for one am deafened by the silence when it comes to someone giving a concrete 
recommendation as to which IDE software we should therefore purchase. As a 
programmer I simply want to write programmes that use Microsoft libraries, 
which make use of OSG, and which do not report false positives. I want a nice 
front end to the IDE as I am inherrantly lazy, and like point-and-click rather 
than command line RSI.

Now, if I understand Cory's comments correctly, he has tracked some of the 
issues down to these singletons. Could someone please explain why his 
question regarding a restructing of these problem structures/objects doesn't 
deserve serious consideration ?

I have wasted days - if not weeks (no exageration here at all) - in trying to 
track through programmes to identify what may be a memory leak, only to find 
that its another false positive. If a little restructuring could address the 
failing of the MS tools, whilst not imposing a significant overhead on other 
platforms, why is this not a good thing to consider ?

Sorry to go on about this, but I'm currently faced with a nasty little problem 
as to inconsistent bahaviour between compilations of my activeX viewer that 
uses OSG. I'm facing the prospect of trying to track through what is happening 
with this nagging doubt that I'm not releasing memory when I should be, but I 
am swamped by the false positives.

Could someone please help us with these false positives ?

Thanks for listenning. If I have offended, it was not intended.

Neil.









 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: 
 Hi Cory,
 
  Can anybody recommend a Windows-based memory tracking tool?
 
 I have not found any tool on Windows that gave me useful results. 
 Perhaps that was through lack of Google-skills or whatever, but I ended 
 up changing osg::Referenced to keep track of where objects were 
 allocated/destroyed. For a start, you can enable
 
 #define DEBUG_OBJECT_REF_UNREF
 
 in src/osg/Referenced.cpp and then recompile OSG and relink with your 
 app. This will tell you, on the command line, each time an 
 osg::Referenced object (or subclass) is allocated and destroyed, as well 
 as a count of the number of objects that are currently allocated. You 
 will most likely see that the count goes down to 0 at the end of your 
 program, meaning there are no memory leaks.
 
 Those static objects you saw are not leaks, of course, and in my testing 
 I got anywhere between 40 and 300 of them in various places. You can 
 test by, for example, changing the osgviewer application so that the 
 whole main() function is enclosed in a block ( { } ) and then put a 
 breakpoint before and after that block. You will probably get a few 
 objects allocated before anything OSG is called in the main(), and about 
 47 OSG objects still live after the block. But all those are deleted 
 once you exit the app.
 
 If you find you do have memory leaks (the memory usage of your app grows 
 at run time even though you shouldn't be allocating anything), then 
 check the osg-submissions archives for a modified osg::Referenced 
 header/implementation which I posted about 2 weeks ago.  You can use 
 this to create an AllocationObserver which will be called at each ref(), 
 unref() and unref_nodelete() so that you can know where the call was 
 made. These leaks generally come from some object keeping a ref to an 
 object when it shouldn't, like a list/vector/map not being cleared or 
 whatever, so you can print out the call stack at those points, and 
 inspect all the results to see where the object's last ref is coming 
 from, for example.
 
 But in general, as Robert said, VS's memory leak check is crap. There 
 are apparently ways to fix it somewhat, but even then I wouldn't trust it.
 
 Hope this helps,
 
 J-S
 -- 
 

[osg-users] How does DEEP_COPY_ALL treat textures?

2009-01-30 Thread neil.hughes
Hi All,

Can anyone assist with an issue/misunderstanding I'm having when using 
DEEP_COPY_ALL please ?

The issue is that if I have a cube that I apply a texture to and add to the 
scenegraph. This displays very quickly and no problems. If then do a clone 
operation on the cube - say 400 times - adding each cloned node to the 
scenegraph with a changed parent transform so that I effectively have an 
arrangement of tiles in a grid like pattern, the realisation of the first frame 
is very slow. Once first frame is realised, subsequent frame rate is fine. Its 
almost as if, even though the DEEP_COPY_ALL operation has completed, the nodes 
are referencing something that the first frame needs to resolve. The only thing 
I can think of -perhaps erroneously I accept - is that the textures are having 
to be loaded. Is this the case, and if so, what can I do to speed up 
realisation of the first frame?

Thanks for any help.

Kind regards

Neil
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How does DEEP_COPY_ALL treat textures?

2009-01-30 Thread neil.hughes
Hi All,

Can anyone assist with an issue/misunderstanding I'm having when using 
DEEP_COPY_ALL please ?

The issue is that if I have a cube that I apply a texture to and add to the 
scenegraph. This displays very quickly and no problems. If then do a clone 
operation on the cube - say 400 times - adding each cloned node to the 
scenegraph with a changed parent transform so that I effectively have an 
arrangement of tiles in a grid like pattern, the realisation of the first frame 
is very slow. Once first frame is realised, subsequent frame rate is fine. Its 
almost as if, even though the DEEP_COPY_ALL operation has completed, the nodes 
are referencing something that the first frame needs to resolve. The only thing 
I can think of -perhaps erroneously I accept - is that the textures are having 
to be loaded. Is this the case, and if so, what can I do to speed up 
realisation of the first frame?

Thanks for any help.

Kind regards

Neil
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How does DEEP_COPY_ALL treat textures?

2009-01-30 Thread neil.hughes
Hi All,

Can anyone assist with an issue/misunderstanding I'm having when using 
DEEP_COPY_ALL please ?

The issue is that if I have a cube that I apply a texture to and add to the 
scenegraph. This displays very quickly and no problems. If then do a clone 
operation on the cube - say 400 times - adding each cloned node to the 
scenegraph with a changed parent transform so that I effectively have an 
arrangement of tiles in a grid like pattern, the realisation of the first frame 
is very slow. Once first frame is realised, subsequent frame rate is fine. Its 
almost as if, even though the DEEP_COPY_ALL operation has completed, the nodes 
are referencing something that the first frame needs to resolve. The only thing 
I can think of -perhaps erroneously I accept - is that the textures are having 
to be loaded. Is this the case, and if so, what can I do to speed up 
realisation of the first frame?

Thanks for any help.

Kind regards

Neil
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [RE] How does Deep_Copy work - take 2.

2009-01-30 Thread neil.hughes
Hi Robert et al,

First please accept my apologee for the previous email getting sent 3 times. I 
don't quite know what happened there, but it certainly wasn't intended. 
Gremlins in my system somewhere I would guess. Sorry.

In regards to the clone operation, is there a more optimum alternative that I 
should take ?

Many thanks for the help.

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to deduce the implied size of texture from coordinate mappings....

2009-01-29 Thread neil.hughes
Hi All,

I've had a look through the mail archives, and I don't think this has been 
asked before, so I was hoping someone might be able give some guidence to me on 
a question I'm bashing my head with at the moment. Its not strictly an osg 
question - though I am using osg to try and solve it.

Question
==

I have a general triangle in 3D space, known coordinates, with known S,T 
texture coordinates. Knowing only this information, is it possible to calculate 
the size of the texture?


Background


The background to this problem is that I have an object with texture 
coordinates, that has applied a texture. I now wish to apply a new texture to 
this object where I know the size that this texture is mean't to represent in 
the 3D space. Thus I believe  I need to scale the texture coordinates on the 
object such that the size of the new texture is correctly represented relative 
to the object.

[Brief asside - I suspect that there might be a way to do this other than 
altering all the texture coordinates, perhaps a scale measure on a texture 
object but I haven't delved deep enough into osg::Texture2D to know.]

In order to scale the texture coordinates I need to know the size that the 
original texture represented relative to the object/universe it was in. 

Each geometry could have its own texture, therefore I'm at the geometry level, 
and I have the triangle with the largest variation in the S,T domain.

I can transform this triangle to a cordinate system that is co-planar with the 
triangle, where one edge forms the first of a pair of orthogonal basis vectors 
in the triangle plane (e1,e2), and hence I can represent my triangle in this 
space. 

The S,T domain is coplanar for my requirements, and with a shift of origin, 
(0,0) in the S,T domain maps to (0,0) in the e1,e2 domain. 

So I get to a point where I have the two sets of orthogonal axis in the same 
triangle plane, where a rotation of the e1,e2 axis would align them to the U,V 
axis. 
However, my next step is not clear.

Can any one assist please. I may be barking up the wrong tree here, and if so, 
please accept my apologee.

Thanks  for any help

Neil Hughes.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] RE How to deduce texture size....

2009-01-29 Thread neil.hughes
Hi Art and Gordon,

Thanks for coming back to me. I guess I need to try and get some more info 
about the the texture that was originally applied. 

Great support, as ever, from OSG users.

Kind regards

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Re How to deduce texture size ....

2009-01-29 Thread neil.hughes
Hi Art and Gordon,

A further thought on this was that I omitted to mention that I do know that the 
3D coordinates of the triangles on my object are all in mm. Given that I 
therefore know the real world size of the triangle, and for each vertex I know 
the S,T co-ordinate in the texture domain, would this help at all in the math 
to get a size for the texture applied ?

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Re How to deduce texture size ....

2009-01-29 Thread neil.hughes
Hi Art and Gordon,

A further thought on this was that I omitted to mention that I do know that the 
3D coordinates of the triangles on my object are all in mm. Given that I 
therefore know the real world size of the triangle, and for each vertex I know 
the S,T co-ordinate in the texture domain, would this help at all in the math 
to get a size for the texture applied ?

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Re Hoe to deduce texture size...

2009-01-29 Thread neil.hughes
Hi Gordon,

Many thanks for that. I'll need to scratch head and see if more info on texture 
is available.

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Seeking help in understanding HEADLIGHT light...

2008-08-13 Thread neil.hughes
Hi Robert,

thanks for coming back to me. One thing I left out of my mail was that I'm 
still using OSG 1.2 - though looking to migrate very soon. Is your response 
still valid for OSG 1.2?

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Seeking help in understanding HEADLIGHT light...

2008-08-11 Thread neil.hughes
Hi All,

I'm trying to adjust the light that is created as part of the HEADLIGHT option, 
as it appears to be washing out an another light that I have in my scene. 
Essentially I'd like to take its effect down so that it only comes into play 
when I'm close to an object. 

I've tried adjusting the light on the scenedecorator, and I'm monitoring the 
apply function on the Light, and I see my values coming through, but I'm also 
getting the original values coming through. Its as if I have two lights in the 
room, but I haven't added any, other than the headlight option.

In an attempt to track what was happening I've discovered that when the 
camera is set up, it also has a light created. I don't know if this is 
important or not.

Can anyone help please ?

Many thanks

Neil
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Coordinate system mapping from WTK to OSG...

2008-08-11 Thread neil.hughes
Hi Jason,

thanks for the comments. I think I've got to the bottom of it now. There is 
some rather irritating issues associated with which rotation is performed 
first. Finally got an ordering (trial-and-error) that did what it was supposed 
to do. Coupled with the rotation about X I feel significantly older now ;-(

Once again, thanks for the comments.

Regards

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Coordinate system mapping from WTK to OSG...

2008-08-07 Thread neil.hughes
Hi All,

At the risk of appearing very dense, could I ask for a little help with a 
problem that I have been banging my head against a wall with for the the past 
week?

The problem is that I have a position and orientation of an observer described 
by a position vector, and a vector of euler angles that represent the 
orientation of the observer. To complicate matters, the coordinate system in 
operation when this information was created was that of WorldToolKit (WTK) - in 
fact we were using WTK when creating this information. In this system positive 
Y is down, and positive Z is in towards the screen, with positive x traversing 
left to right.

Now, I would like to represent the position and direction of view (orientation) 
in OSG's coordinate space. 

Now, as I understand it, a rotation of -90 degrees will take a point in OSG 
space, and represent it in WTK space - and the inverse doing the reverse. Cool.

The issue I have is what should happen to the orientation vector. The euler 
angles were obtained from WTK's quaternion to euler function. I've looked at 
the order of multiplications that occur in WTK when creating the resultant 
rotation, yet I still can't seem to get the correct result.

So, if anyone out there has experience of mapping from WTK to OSG, specifically 
in regards to what should happen to rotation angles, and quarternians, I would 
be most grateful - and perhaps my wall could then be repainted beige instead of 
red ;-(

Many thanks for any help

Neil.



I am trying to bring this into OSG.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] What's the mpr.dll ?

2008-04-20 Thread neil.hughes
Hi,

You've just encountered the wonderful world of Windows.

If you look up the mpr.dll problem on  the internet, you eventually get to find 
out that the Depends.exe of windows has problems with late binding 
dependencies. This is really an issue with Depends, not your programme. The 
best advice I can give - having spent many an hour trying to resolve this 
myself - is that you can safely ignore this warning, and any to do with 
shlapi(?) as well. At run time, the relavent stubs run, and everything is fine.

If you application is failing on another machine, it is highly unlikely that 
these warnings can contribute to tracking down what the problem is.

If the app is an osg one, did you copy across all the osg dlls? I usualy forget 
openthreads myself ;-(

Hope this shortens your search.

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Highly detailed closed scene navigations...

2008-04-15 Thread neil.hughes
Hi Jason  Robert,

Sorry for not getting back to you sooner.

Many thanks for the info. I guess I'm going to have to just suck-and-see. The 
occluder route looks to have the greatest gains for me. 

Once again, many thanks to yourselves and the forum.

Kind regards

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Highly detailed closed scene navigations...

2008-04-10 Thread neil.hughes
Hi All,

Not sure if I've got the correct title for this question, but hopefully the 
forum might be able to help. 

Suppose that I wish to model a complete office in OSG. The office is on two 
floors, the downstairs split into many rooms, the upstairs open plan. Desks, 
computers, windows, doors and everything that you would find in an office needs 
to be modelled, down to the pencil on the desk and the clutter in the corner.

Resource wise we are talking potentially a few thousand models, each with two 
LOD's, all with highly detailed, high resolution textures, and many many 
facets. In fact the design is so big that I can't load it all into memory.

What are my options ?

My client won't accept any delay in transiting from one area of a design to the 
next. So multiple design files for the individual areas seems a non starter, 
unless someone can tell me how I could do this without a delay moving from one 
area to the next. Some form of preemptive loading springs to mind, but is there 
an existing mechanism within OSG for handling that sort of thing ?

My thoughts led to the database pager, but I haven't used this at all, and 
would hate to start looking at it only to find a few weeks later that it really 
isn't suitable for my needs.

Can anyone suggest an approach given the constraints please ?

Many thanks

Neil.



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] RE FLT export submission imminent

2008-03-28 Thread neil.hughes
Hi Paul, Bob  Robert,

Once again many thanks for the work you guys are doing.

Robert, thanks for the advice. I'd thought of this route myself, and have 
consequently been trying to get the latest SVN, but for some reason it keeps 
hanging. Probably my company network causing grief ;-(

Bob  Paul, I take your point, and I would love to be in a position to take you 
up on a support contract, however, if I can prove the conversion route, I'll 
invest some time and get a colleague to migrate our work from 1.2 to the latest 
stable release with patches. Looking to include the shadow work that's been 
done as well, so this is likely to be the most productive route for ourselves.

Once again, thanks for your help.

Kind regards

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Building Collada plugin in OSG 1.2....

2008-03-27 Thread neil.hughes
Hi Steve,

Thanks for the info. I'll give Dom1.3 a look just to get up to speed with 
Collada.

Cheers

Neil.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] RE FLT export submission imminent (Paul Martz)

2008-03-27 Thread neil.hughes
Hi Paul,

Will your work integrate with OSG1.2 ?

Irrespective of that, I will give it a go soonest and give you some feedback.

Many thanks for doing this work, as you know I've been champing-at-the-bit for 
it. Thanks also to your funding source :-)


Kind regards

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] RE OSG to Multi-Gen Creator...

2008-03-14 Thread neil.hughes
Hi Robert,

Sorry for the noise. In part I couldn't remember what I'd asked before, but 
also the emphasis of my request was slightly different in that, as I don't know 
creator at all and don't even have the application, I don't know what other 
formats it can take in. I do, however, have a client who needs to get models 
into that package. I was merely asking whether there was an alternative route 
to getting an osg scene into creator - even via a third party if necessary - so 
that I could at least get something for my client whilst the OSG pluggin was 
being developed further by Paul. 

I shall assume, from your response, that there isn't really an alternative that 
I can take, and I shall await the release of the new pluggin from Paul.

Once again, sorry for the noise.

Kind regards

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] RE OSG to Multi-Gen Creator...

2008-03-14 Thread neil.hughes
Hi Robert and Gordon,

Many thanks for the responses.

I think I failed to make my problem clear. Sorry.

I have an OSG scene. My client needs to load this into Creator to do some 
additional work on it. Once he has finished his work, he exports to FLT from 
Creator, and runs osgconv to convert it to an IVE file.

I'm looking for a means of doing the transfer from OSG to Creator. The rest is 
already sorted. Whilst the FLT export pluggin was being developed I hoped to 
achieve the export from OSG to Creator via another format. 

My colleague looked at .obj but the results from the OSG export weren't good 
(apparently - though I haven't seen them myself). I don't think we tried the 
COLLADA, but given your response, Gordon, I suspect I'm not going to be 
successful there.

Looked at Polytrans as we already have a version here, but didn't spot any 
support for COLLADA.

Thanks for your help on this.

Regards

Neil
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] RE. Philips WOW TV displays...

2008-03-09 Thread neil.hughes
Hi Robert and Kim

Many thanks for the info. This should make life a little easier I hope.

In regards to the depth resolution, Kim's observations tie up with what we've 
observed. As we fly closer into the room - a kitchen in our case - the back 
half of the room suddenly looses depth information, and hence the depth effect 
is lost.

A colleague of mine was wondering whether the depth information is only being 
used on first frame, and after that is never reset ? I'm not sure myself. 
Looking for guidance really. Any thoughts ?

Once again many thanks for the info so far. Will let you know if we discover 
anything. 

Is anyone talking to philips about these issues of loss of depth?

Kind regards

Neil.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Philips WOW TV displays...

2008-03-07 Thread neil.hughes
Hi All,

Not sure I've asked this before. If I have, sorry.

I've got access to a couple of Philips WOW TV's for a few days, and a colleague 
has been playing with them for the past week. One of the supporting 
applications is written in OSG, and generates a split screen image. The left 
half is the standard 3D view, whilst the right half is the depth map.

Now I know that I can set this up myself, however we suspect that there is more 
to it than this, as we've taken a screen grab of this screen image and sent it 
to the display, and it still doesn't show it as a combined 3D with depth feel. 
Does anyone know anything about this display, and perhaps could shed some light 
on what we need to do to get a normal OSG split screen to work with it?

We suspect that there are a few calls that we are missing. Any pointers would 
be really useful.

By the way, using the supplied OSG viewing with our room it looks really quite 
cool. I was a bit of a sceptic at first, but it seems that Philips may have 
something really neat here. If you get a chance, check it out.

Regards

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] RE Plugin loading problems....

2008-03-06 Thread neil.hughes
Hi Robert  Gordon,

Thanks for your interest in this.

I'm as certain as I can be that the dll is failing to load because its usage is 
within an ActiveX control. Under Visual studio you can switch on extended 
information for seeing what happens when the LoadLibrary is performed. The 
output records the fact that when trying to load the osgdb_ive.dll file, the 
loader failed to find the osgSim.dll. This dll is in the same location as the 
ive dll, and was built at the same time.

The output also shows the path that was searched. Within the path was the . 
directory. I take this to mean ie the current execution path directory. As the 
LoadLibrary found the osgdb_ive.dll, I can only assume that its knowledge of 
where it is running from is correct, as the ActiveX control is also located, 
and registered, within the directory that the osg dll's are.

So the only conclusion I can come to is that when dynamically loading a dll 
that has dependencies on other, as yet not loaded dlls, within an ActiveX 
control, there appears to be an issue.

When I get a chance I'll set up a little test case, and assuming this proves to 
be the case, I'll submit it to the forum - only for the Windows users thought 
;-(


If you want more info I can send the extended output from Visual Studio. Its 
quite explicit in where it fails.

Kind regards

Neil.



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] RE Plugin loading problems....

2008-03-05 Thread neil.hughes
Hi All,

I think I can now shed some more light on this problem, and perhaps I have 
found a potential bug.

In the last update to this issue I had tracked the problem down to something to 
do with osgSim not wanting to load as a dependency of osgDB_ive.dll - and 
osgDB_flt.dll.  On further investigation I think this is ultimately the issue. 
If in my ActiveX control I force an explicit, fully qualified dynamic load to 
osgSim, and then try saving as an ive file, everything is fine and all works. 
However, if I don't force the explicit load, the save fails as the plugin dlls 
for the ive format fails to load because it fails to load the osgSim dll.

In order to get around this issue I forced an explicit linkage to osgSim in my 
activeX control - merely by creating and deleteing an osgSim::LightPoint 
object. The ActiveX control subsequently needed to link to osgSim, and hence 
when the control starts, osgSim is loaded - not as part of the plugin process , 
but as a consequence of the control loading up. When I now save as an ive file 
everything is fine.

Clearly there is an issue, with osgSim loading as a consequence of a plugin, 
rather than an explicit linkage. Any thoughts ?

Neil
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] RE Plugin loading problems....

2008-03-05 Thread neil.hughes
Hi Robert,

thanks for coming back to me.

I think you're correct. I think this is an issue within MS and ActiveX 
controls. It does appear that that the LoadLibrary has issues resolving 
dependencies of libraries that are being loaded, when issued from within an 
ActiveX control. 

Obviously this isn't one for OSG as you can only use the call that is available 
- LoadLibrary. Having now got to a point where I can fix the issue with a 
relatively small alteration to the ActiveX control, I'm not too concerned. 
Hopefully if anyone else encounters this problem, this thread might be of use.

Kind regards

Neil



Perhaps 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Plugin loading problems....

2008-03-04 Thread neil.hughes
Hi All,

I asked this question a couple of weeks ago, and Paul and others were kind 
enough to offer some advice, but I'm still having problems so I thought I would 
reword it a little to see if it sparks any more ideas with the forum.

The issue I have is that I have an ActiveX control that wraps the OSG 
functionality - well the bits I want. This control loads 3DS models, applies 
textures (targas and jpegs), and all this occurs over the internet. Clearly for 
this to be working the osgdb_net,  osgdb_jpg, osgdb_3ds and osgdb_tga plugins 
must all be loading correctly, and indeed they are.

I now come to the issue which is that I would like to be able to save a .ive 
file. I can save (thanks to Roberts help) a .osg file with all the 
information I need for OSGViewer to display the scene, however I thought it 
would be good to look at saving the equivalent .ive format. The issue that I 
have is that when I tell OSG to save the .ive file it eventually gets to the 
routine

DynamicLibrary::HANDLE DynamicLibrary::getLibraryHandle( const std::string 
libraryName)

and fails to load the osgdb_ive.dll file. The curious thing is that the file is 
exactly where all the other dll's are, and the path that the LoadLibrary 
function uses is the path to the dll. In the previous post I made I was trying 
to load the osgdb_flt.dll and this also failed. I now have the same problem 
with at least two plugin dlls and I don't see what the difference is.

Can anyone shed some light on this please ?

I think it might be to do with dll dependencies that may not be loaded but I 
can't see why.

Many thanks

Neil.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG file format and textures...

2008-03-03 Thread neil.hughes
Hi Robert,

thanks for getting back to me.

I think there is probably a whole load of confussion at my on this point. I had 
mistakenly assumed that the information I was looking at in the OSG file was 
the embedded textures. Doh! Evidently I should try reading the node names in 
the osg file. Sorry.

You are correct, I think it really is just the texture references that I should 
have told it to export as well.

Thanks for the help.

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG file format and textures...

2008-03-01 Thread neil.hughes
Hi All,

Sorry if this is an old chestnut, but I got a question about the .osg file 
format.

I've got a scene created, and I save the universe out as a .osg file. I've 
passed no options through in the the call, so the file that's created appears 
to have the textures that the scene uses actually embedded within the osg file. 
For my purposes this is great. However, when I double click on the osg file, 
and view it with the osgviewer, no textures appear.

I should add at this point that I'm still using OSG 1.2 - would love to move on 
but no time at the moment.

So, has anyone come across this problem before ?

The textures that have been used are targas and jpegs if that's any help.

It appears that using the options parameter I could force the save to merely 
record a reference to the texture, and this would solve my immediate problem, 
however I thought that I may have stumbled across a minor bug, and wanted to 
check if anyone knew about it.

Thanks for any comments

Neil.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Help with OpenFlight....

2008-02-19 Thread neil.hughes
Hi All,

Encountered a slight problem that I don't quite understand.

I have a scene (or universe if you like) and I want to save it as an openflight 
(.FLT) format. Tracking through the call to write the universe node, I get to 
the point where it needs to load in the osgdb_OpenFlightd.dll library. It makes 
the call, but returns a null handle. Help?

I've tried saving a .osg format and that works fine.

Any thoughts ?

Thanks

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Help with OpenFlight....

2008-02-19 Thread neil.hughes
Hi All,

Thanks for the comments about openflight. I guess I have to wait for Paul's 
work to become available. Would be happy to beta test if that is any help, 
although I confess to not knowing anything about the details of the flt format.

Having said all this, I guess the point of my mail is still open. Why would the 
LoadLibrary fail for the openflight osg dll given that its all compiled on my 
machine, and dll is in the correct place? A bit concerning really. I can accept 
that once loaded I'm not going to get far with the save command, but it should 
at least load the library.

Any thoughts would be most welcome.

Kind regards

Neil.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Re How to override plugins...

2008-01-25 Thread neil.hughes
Hi Robert,

Thanks for that. I thought it would be easier to derive from existing zip 
reader, but evidently that wasn't the way to do it as I then ended up creating 
two zip reader instances as the proxy construction and the class definition 
for the base zip reader are in the cpp file. I've fixed my problem by simply 
deriving from ReaderWriter instead.

This brings me to a more general question about readers.

Is there a reason why some employ the .h .cpp conventions, whilst others roll 
them all into one - either .h or .cpp ?

Thanks again for the info.

Neil
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to override default plugins....

2008-01-24 Thread neil.hughes
Hi all,

I wish to supply my own plugin for the zip format, which unzips to memory. 

I've created my plugin derived from the existing zip plugin, overridden the 
readnode functions for file and stream, and at the bottom of my class I've 
called the RegisterReaderWriterProxy template for my class.

It all appears to work, but I now have two zip file format plugins. The 
original, and mine. My one gets called second due to the way the 
RegisterReaderWriterProxy template appends to the existing list of known 
plugins, the plugin it is given.

Ideally I would like to remove the existing plugin from the known list, thus 
there would only be my zip file plugin, and life is happy. However I am unclear 
how to do this, or even whether it is possible. Can anyone suggest what to do 
please ?

I can see that there is a call removeReaderWriter in the registry, but can't 
see how I could call it with the original zip plugin reader, as this would 
surely have problems at shut down when the proxy class was destroyed.

Please help

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to exclude nodes from a pick list

2007-11-09 Thread neil.hughes
Hi Andreas,

Many, many thanks for that. My problem is now sorted, and I can look forward to 
the cheesey wall paper decorating my walls.

Kind regards

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to exclude nodes from a pick list

2007-11-08 Thread neil.hughes
Hi All,

I have a quick question. I'm playing with picking objects in a scene using the 
pickhandler example. The scene is essentially a big box whose faces face 
inwards. Within the box I have a smaller box whose faces face outwards. If I am 
outside both boxes, looking into the outer box, the pickhandler returns both 
the outer box, face that I have hit, and the inner box faces that I have hit. 
As the outer box face is actually facing away from me,  I want to exclude it. 
Is there an easy way to do this?

My thinking was that I essentially need to look at the normal of the face that 
I hit, and the direction of view vector for the camera, take the dot product, 
and if positive exclude it. Does this sound right? Is there an easier 
way/structure that I should use?

Many thanks for any help

Neil.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to exclude nodes from a pick list

2007-11-08 Thread neil.hughes
Hi All,

I have a quick question. I'm playing with picking objects in a scene using the 
pickhandler example. The scene is essentially a big box whose faces face 
inwards. Within the box I have a smaller box whose faces face outwards. If I am 
outside both boxes, looking into the outer box, the pickhandler returns both 
the outer box, face that I have hit, and the inner box faces that I have hit. 
As the outer box face is actually facing away from me,  I want to exclude it. 
Is there an easy way to do this?

My thinking was that I essentially need to look at the normal of the face that 
I hit, and the direction of view vector for the camera, take the dot product, 
and if positive exclude it. Does this sound right? Is there an easier 
way/structure that I should use?

Many thanks for any help

Neil.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to exclude nodes from a pick list

2007-11-08 Thread neil.hughes
Hi Robert,

sorry, I didn't really explain myself very clearly. The issue isn't so much 
that I don't want the face from the outer box to be hit, I merely want to be 
able to identify that it is facing away from the camera, and hence I can ignore 
it when try to identify that the inner box has been hit. 

The outer box essentially represents the walls of a room. From outside the 
room, looking in, I can see the interrior walls which is correct. If I am 
outside my room looking in, when I click on the box that sits on the floor of 
my room, I get a pick list that includes the wall that I am looking through. 
The difficulty is that I wish to discard this, and get the next item in the 
pick list which is the box that sits on the floor. I can't simply skip the 
first intersection, as if I were inside the room, then the box on the floor 
would be the first intersection and I would miss it. 

Given that I've got a hit on the wall that I'm looking through - which faces 
away from me and hence isn't visible as the culling gets rid of it for 
rendering purposes -what I need to do is essentially marry the culling that 
occurs for rendering with a pick handler so that the pick handler only 
considers faces that a rendering cull would want to render.

My thinking was that, rather than go to the headache of trying to do the 
marry it would be simpler to take my hit list, and perform the calculation 
that basically says whether the face is facing towards the camera, or away from 
it. 

The hit records gives me a world normal of the face that is hit. I thought that 
the simplest thing to do would be to get the vector of the direction of look 
for the camera, multiply the two vectors, and discard those with a positive 
component in the direction of the camera view. My difficulty is in getting the 
vector that represents the direction of view of the camera. I don't know how to 
do that, and I guess thats what I really need the help with. 

Could you tell me how I get this vector, or perhaps suggest an alternative 
approach ? Surely the node mask approach would prevent me selecting the 
interior wall that is facing towards me, which isn't right as I may wish to 
select this wall and put a really cheesey wall paper texture on it :-)

I would be grateful for any help on this.

Kind regards

Neil

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Function decoration....

2007-11-05 Thread neil.hughes
Hi All,

I'm having a slight problem building a release version of OSG1.2. I know I 
should move to 2.2 - and a colleague of mine has - however for various reasons 
I'm unable to at this moment. 

I'm running VS2005, and the problem I have is that I can build a debug version, 
link it against my app, and everything is fine. When I build the Release 
version of the OSG1.2 and link this against the release version of my app I get 
5 unknown function calls - as follows.

1axtest1ctrl.obj : error LNK2001: unresolved external symbol public: virtual 
bool __thiscall osgProducer::Viewer::realize(enum 
Producer::CameraGroup::ThreadingModel) ([EMAIL PROTECTED]@osgProducer@@[EMAIL 
PROTECTED]@Producer@@@Z)
1axtest1ctrl.obj : error LNK2001: unresolved external symbol public: virtual 
bool __thiscall osg::Group::removeChild(unsigned int,unsigned int) ([EMAIL 
PROTECTED]@osg@@[EMAIL PROTECTED])
1axtest1ctrl.obj : error LNK2001: unresolved external symbol public: virtual 
bool __thiscall osg::Group::removeChild(class osg::Node *) ([EMAIL 
PROTECTED]@osg@@[EMAIL PROTECTED]@@Z)
1axtest1ctrl.obj : error LNK2001: unresolved external symbol public: virtual 
bool __thiscall osg::Geode::removeDrawable(unsigned int,unsigned int) ([EMAIL 
PROTECTED]@osg@@[EMAIL PROTECTED])
1axtest1ctrl.obj : error LNK2019: unresolved external symbol 
__declspec(dllimport) public: void __thiscall 
osg::CameraNode::setRenderOrder(enum osg::CameraNode::RenderOrder) ([EMAIL 
PROTECTED]@osg@@[EMAIL PROTECTED]@@Z) referenced in function public: unsigned 
long __thiscall CAxTest1Ctrl::CreateHUDNode(void) ([EMAIL PROTECTED]@@QAEKXZ)
1CorrectInitialUnitPartMatrixVisitor.obj : error LNK2019: unresolved external 
symbol __declspec(dllimport) class osg::Matrixd __cdecl 
osg::computeLocalToWorld(class std::vectorclass osg::Node *,class 
std::allocatorclass osg::Node *  const ) ([EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]@osg@@@std@@@std@@@Z) 
referenced in function public: virtual void __thiscall 
CCorrectInitialUnitPartMatrixVisitor::apply(class osg::Transform ) ([EMAIL 
PROTECTED]@@[EMAIL PROTECTED]@@@Z)


Sorry about that. Anyway, on closer inspection it appears that my app is trying 
to link to 
osg::Group::removeChild(unsigned int,unsigned int) ([EMAIL 
PROTECTED]@osg@@[EMAIL PROTECTED])

however when I examine the OSG dll produced when building a release version it 
contains the decorated function

osg::Group::removeChild(unsigned int,unsigned int) ([EMAIL 
PROTECTED]@osg@@[EMAIL PROTECTED])

(in case you missed it, the bit that's different is the decoration).

I've trawled through the MS documentation, played with a few compiler/linker 
settings associated with inline functions, all to no avail.

Has anyone got any ideas ?

Many thanks for any help.

Neil.




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [RE] Function decoration...

2007-11-05 Thread neil.hughes
Hi All,

I've sorted out my problem. No doubt most of you guessed, but I was picking up 
the wrong header file. Doh!

Sorry to have bothered you.

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Osg blocking on application exit...

2007-10-03 Thread neil.hughes
Hi Robert,

Sorry about that last email. I wasn't trying to Dis the OSG multithreading, 
my comment was in regards to the recent exchange about toggling textures on/off 
and changing threading modes of operation dynamically at run time. There seemed 
to be forum comments regarding some potential instability there, and I was 
merely highlighting this to one of my colleagues. Sorry if it came across as 
something else. To be totally frank about it, the email wasn't event mean't to 
go to the list, but I missed the recipient list when I replied to Chris. Doh!

Neil.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgViewerMFC example fails...

2007-09-07 Thread neil.hughes
Hi All,

Has anyone tried the osgViewerMFC example in OSG2.0?

I tried to build it two days ago, and it failed. The issue is in regards to an 
assignment of a CString to a std::string. Trawling internet solved problem, but 
has the example been corrected for the 2.2 release ?

Neil.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org