Re: [osg-users] How do PagedLOD children expire?

2007-09-10 Thread Bradford, Chase

Paul,

PagedLODs are registered as inactive when their frame count gets out of synch 
with the overall viewer.  Once they become inactive, their children are 
released.  In other words, if each child has an identical bounding sphere, none 
of them will get freed until the lowest child is culled.

Chase

-Original Message-
From: [EMAIL PROTECTED] on behalf of Donald Tidrow
Sent: Mon 9/10/2007 5:12 PM
To: Public OpenSceneGraph Users discussion list.
Subject: Re: [osg-users] How do PagedLOD children expire?
 


Paul Martz wrote:
> Hi Robert -- My understanding of the DatabasePager is that PagedLOD 
> children that are not visible in the current view volume should 
> eventually "expire", which I assume means be unloaded from memory. OSG 
> would then have to reload such children from disk if they ever came back 
> within range. However, I am not seeing a decrease in process size when 
> PagedLOD children are not visible. Please let me know if I've somehow 
> misunderstood the intent of the DatabasePager and PagedLOD.
>  
Even if the PagedLOD children are getting freed properly, I'm not sure 
that the process will actually release the associated memory back to the 
  OS.  A lot depends on how the heap memory manager deals with freed 
memory - most cases I've seen the memory manager assumes that you'll 
need that memory again soon and keeps it as part of the overall process 
memory footprint.  Even so, the OS will often swap out those pages if 
they're not actively being used and the physical memory is needed by 
other processes.

If you can, check to see how much of the program's memory is actually 
'resident' in system RAM vs. the 'virtual' memory total - I know that on 
Linux/Unix the 'top' command will show this, not sure about Windows though.

> If I understand correctly, the default expiry delay is 10 seconds, so I 
> should see children being deleted after they are moved outside the view 
> volume for 10 consecutive seconds.
>  
> FYI, I'm attempting to cook my own paged database for a tiled OpenFlight 
> terrain database. I'm doing this with a top-level Group node with 
> several PagedLOD child nodes, one for each tile in the database. Each 
> PagedLOD has its own explicit center and radius based on the tile 
> location and size. So, if you think the issue might be misconfiguration 
> of the PagedLOD nodes, then I'd say this is possible, though I can't see 
> what I might be doing wrong from looking at the PagedLOD and LOD headers.
>  
> I'm using osgViewer, so DatabasePager config is handled automatically.
>  
> Thanks for any insight,
>  
> Paul Martz
> *Skew Matrix Software LLC*
> http://www.skew-matrix.com 
> 303 859 9466
>  
> 
> 
> 
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote."
- Benjamin Franklin

++
|  Don Tidrow|
|  Visualization Software Engineer   |
|  SAIC  |
|  ph: 703-253-1094  |
++
___
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] osgviewer functionality

2007-09-10 Thread Steve Nash
I have a question about the functionality of the osgviewer example
functionality with OSG 2.0+.  I see at
http://www.openscenegraph.org/projects/osg/wiki/Community/Tasks/osgViewer
that there is plans to support ASCII configuration files.  Does this
include both the camera config file and reading flight path files (-c
and -p respectively with pre OSG 2.0 osgviewers)?

Additionally, it seems the new osgviewer isn't honoring the $DISPLAY env. 
variable.
It seems to always use :0.0, in spite of what $DISPLAY is set to (I also tried
using OSG_SCREEN, which resulted in use of  :0.$OSG_SCREEN).  I built both 2.0
and 2.1.9 on RHEL4U3, with the same results.

Sorry if this has been hashed out elsewhere, but I couldn't find it in the
archives.

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


[osg-users] osgCal + osgViewer::CompositeViewer

2007-09-10 Thread Renato Silveira
I'm trying to use osgCal with osg::CompositeViewer. I did exactly what was
showed in the osgCompositeViewer example. When I use osg::Viewer all works
OK!  With osg::CompositeViewer, everything loads OK, but the characters
animations stops.
Is there anybody with the same probem?

Ah! I also got this same behaviour in some pcs, when I run the osgCalViewer
example using:

osgUtil::Optimizer optimzer;
optimzer.optimize(...);

Maybe I'm doing wrong...

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


Re: [osg-users] How do PagedLOD children expire?

2007-09-10 Thread Donald Tidrow


Paul Martz wrote:
> Hi Robert -- My understanding of the DatabasePager is that PagedLOD 
> children that are not visible in the current view volume should 
> eventually "expire", which I assume means be unloaded from memory. OSG 
> would then have to reload such children from disk if they ever came back 
> within range. However, I am not seeing a decrease in process size when 
> PagedLOD children are not visible. Please let me know if I've somehow 
> misunderstood the intent of the DatabasePager and PagedLOD.
>  
Even if the PagedLOD children are getting freed properly, I'm not sure 
that the process will actually release the associated memory back to the 
  OS.  A lot depends on how the heap memory manager deals with freed 
memory - most cases I've seen the memory manager assumes that you'll 
need that memory again soon and keeps it as part of the overall process 
memory footprint.  Even so, the OS will often swap out those pages if 
they're not actively being used and the physical memory is needed by 
other processes.

If you can, check to see how much of the program's memory is actually 
'resident' in system RAM vs. the 'virtual' memory total - I know that on 
Linux/Unix the 'top' command will show this, not sure about Windows though.

> If I understand correctly, the default expiry delay is 10 seconds, so I 
> should see children being deleted after they are moved outside the view 
> volume for 10 consecutive seconds.
>  
> FYI, I'm attempting to cook my own paged database for a tiled OpenFlight 
> terrain database. I'm doing this with a top-level Group node with 
> several PagedLOD child nodes, one for each tile in the database. Each 
> PagedLOD has its own explicit center and radius based on the tile 
> location and size. So, if you think the issue might be misconfiguration 
> of the PagedLOD nodes, then I'd say this is possible, though I can't see 
> what I might be doing wrong from looking at the PagedLOD and LOD headers.
>  
> I'm using osgViewer, so DatabasePager config is handled automatically.
>  
> Thanks for any insight,
>  
> Paul Martz
> *Skew Matrix Software LLC*
> http://www.skew-matrix.com 
> 303 859 9466
>  
> 
> 
> 
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote."
- Benjamin Franklin

++
|  Don Tidrow|
|  Visualization Software Engineer   |
|  SAIC  |
|  ph: 703-253-1094  |
++
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How do PagedLOD children expire?

2007-09-10 Thread Paul Martz

> The DatabasePager has a lower limit on the number of expired 
> PagedLODs before it starts removing expired ones; I believe 
> the default is 100.
> So, unless 100+ PagedLODs are loaded, you won't see any 
> removed due to expiring. I recall someone adding a function 
> to the DatabasePager so you could configure this, but I don't 
> have the reference handy at the moment.

Thanks. I see a variable targetNumOfInActivePagedLODs, hardcoded to 100, in
DatabasePager::removeExpiredSubgraphs(). This is in the v2.0 source. The
change you're referring to must be fairly recent.
   -Paul

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


Re: [osg-users] How do PagedLOD children expire?

2007-09-10 Thread Zach Deedler
Hello Paul,

 

I went through many pitfalls when I was doing paged databases.  I'll list
them here, and maybe something will catch your eye?

1) Originally I wasn't using osgviewer, and I was loading models on demand.
After you load the model you have to call some function to register the
paged lods.  Osgviewer does this automatically.

2) The paged lod range is different than its culling radius.  Use setRange
for where you want the object to page in/out.

3) Make sure culling is active on the paged lod.

4) There may be some number of objects that are loaded before they start
expiring.

 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz
Sent: Monday, September 10, 2007 5:31 PM
To: 'Public OpenSceneGraph Users discussion list.'
Subject: [osg-users] How do PagedLOD children expire?

 

Hi Robert -- My understanding of the DatabasePager is that PagedLOD children
that are not visible in the current view volume should eventually "expire",
which I assume means be unloaded from memory. OSG would then have to reload
such children from disk if they ever came back within range. However, I am
not seeing a decrease in process size when PagedLOD children are not
visible. Please let me know if I've somehow misunderstood the intent of the
DatabasePager and PagedLOD.

 

If I understand correctly, the default expiry delay is 10 seconds, so I
should see children being deleted after they are moved outside the view
volume for 10 consecutive seconds.

 

FYI, I'm attempting to cook my own paged database for a tiled OpenFlight
terrain database. I'm doing this with a top-level Group node with several
PagedLOD child nodes, one for each tile in the database. Each PagedLOD has
its own explicit center and radius based on the tile location and size. So,
if you think the issue might be misconfiguration of the PagedLOD nodes, then
I'd say this is possible, though I can't see what I might be doing wrong
from looking at the PagedLOD and LOD headers.

 

I'm using osgViewer, so DatabasePager config is handled automatically.

 

Thanks for any insight,

 

Paul Martz

Skew Matrix Software LLC

http://www.skew-matrix.com  

303 859 9466

 

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


Re: [osg-users] How do PagedLOD children expire?

2007-09-10 Thread Thrall, Bryan
Paul Martz wrote on Monday, September 10, 2007 4:31 PM:
> Hi Robert -- My understanding of the DatabasePager is that PagedLOD
> children that are not visible in the current view volume should
> eventually "expire", which I assume means be unloaded from memory.
> OSG would then have to reload such children from disk if they ever
> came back within range. However, I am not seeing a decrease in
> process size when PagedLOD children are not visible. Please let me
> know if I've somehow misunderstood the intent of the DatabasePager
> and PagedLOD.   
> 
> If I understand correctly, the default expiry delay is 10 seconds, so
> I should see children being deleted after they are moved outside the
> view volume for 10 consecutive seconds.  
> 
> FYI, I'm attempting to cook my own paged database for a tiled
> OpenFlight terrain database. I'm doing this with a top-level Group
> node with several PagedLOD child nodes, one for each tile in the
> database. Each PagedLOD has its own explicit center and radius based
> on the tile location and size. So, if you think the issue might be
> misconfiguration of the PagedLOD nodes, then I'd say this is
> possible, though I can't see what I might be doing wrong from looking
> at the PagedLOD and LOD headers.   
> 
> I'm using osgViewer, so DatabasePager config is handled automatically.

The DatabasePager has a lower limit on the number of expired PagedLODs
before it starts removing expired ones; I believe the default is 100.
So, unless 100+ PagedLODs are loaded, you won't see any removed due to
expiring. I recall someone adding a function to the DatabasePager so you
could configure this, but I don't have the reference handy at the
moment.

-- 
Bryan Thrall
FlightSafety International
[EMAIL PROTECTED]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OpenThreads SVN issue.

2007-09-10 Thread James Dickson
I am a new user to OSG and been trying to download and compile from source.
I have tried SmartSVN on windows and svn on linux both connected to
the 2.0OSG repository.

Syncing works fine up until I need to sync OpenThreads when I am presented
with the following error:

 Fetching external item into 'OpenSceneGraph/include/OpenThreads'
 svn: PROPFIND request failed on
'/svn/osg/OpenThreads/trunk/include/OpenThreads'
 svn: PROPFIND of '/svn/osg/OpenThreads/trunk/include/OpenThreads': 301
Moved Permanently (http://www.openscenegraph.com)
 i ran:svn co
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.0.0OpenSceneGraph

I used the following command for svn:

svn co
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.0.0OpenSceneGraph

Version of SVN: 1.4.3 (r23084)  compiled Mar 28 2007, 22:48:32

Version of SmartSVN: 3.0.2 build date 2007-08-09

I am also starting from nothing if that makes any difference.
-- 
James Dickson
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How do PagedLOD children expire?

2007-09-10 Thread Paul Martz
Hi Robert -- My understanding of the DatabasePager is that PagedLOD children
that are not visible in the current view volume should eventually "expire",
which I assume means be unloaded from memory. OSG would then have to reload
such children from disk if they ever came back within range. However, I am
not seeing a decrease in process size when PagedLOD children are not
visible. Please let me know if I've somehow misunderstood the intent of the
DatabasePager and PagedLOD.
 
If I understand correctly, the default expiry delay is 10 seconds, so I
should see children being deleted after they are moved outside the view
volume for 10 consecutive seconds.
 
FYI, I'm attempting to cook my own paged database for a tiled OpenFlight
terrain database. I'm doing this with a top-level Group node with several
PagedLOD child nodes, one for each tile in the database. Each PagedLOD has
its own explicit center and radius based on the tile location and size. So,
if you think the issue might be misconfiguration of the PagedLOD nodes, then
I'd say this is possible, though I can't see what I might be doing wrong
from looking at the PagedLOD and LOD headers.
 
I'm using osgViewer, so DatabasePager config is handled automatically.
 
Thanks for any insight,
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com  
303 859 9466
 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PagedLOD preprocessing

2007-09-10 Thread Paul Martz
> > The problem is clear: OSG would probably freeze the computer during 
> > preprocessing when loading all the textures. In Inventor, it seemd
> > simple: just to override the texture type and make the 
> implementation 
> > not to load texture data. Any chance for solution in OSG?
> 
> There every chance of a solution in the OSG, first up you 
> load the data, for instance do it incrementally, and then to 
> generate the LOD levels as required.  This is a tasks for you 
> to work out though - the OSG is a scene graph rather than a 
> modelling tool.

Hi Robert -- Assuming you've massaged your database so that the highest res
textures only get loaded/displayed at close ranges, how would you use OSG to
avoid the (seemingly inevitable) cost of loading the large texture from disk
and sending it over the bus to the graphics card when it is time to be
rendered? The naïve approach -- just let OSG load it -- appears to cause a
guaranteed frame rate hit.

I imagine you could break the texture up into smaller chunks and let OSG
page each in incrementally as it comes into range.

Or, you could preload all textures onto all displays at startup with the
GLObjectsVisitor, though this could tax system RAM for large datasets.

Could PROXY_TEXTURE help? At least it would tell OpenGL "hey, some big data
is coming, eventually" but there would still be the disk access and bus
transmission cost, so I imagine it's not a solution.

Robert, your thoughts please.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
303 859 9466

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


Re: [osg-users] CMake config for OpenVRML plugin - debug vs release libs

2007-09-10 Thread Jean-Sébastien Guay
Hello Luigi,

> A typo... sorry.

That's what I thougt, no problem.

> Try deleting the cache, I think the Find stuff does not recompute if the
> variable is in cache

Ok I'll try that. I'll submit the changes once it all works well. Thanks.

J-S
-- 
__
Jean-Sebastien Guay [EMAIL PROTECTED]
 http://whitestar02.webhop.org/


This message was sent using IMP, the Internet Messaging Program.


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


Re: [osg-users] RTT CompositeViewer

2007-09-10 Thread John Donovan
Hi Robert,
thanks for the quick reply. I've been playing around and it seems happy with
using the same texture to render into. I've since used just a osgViewer::Viewer
rather than the CompositeViewer, and it seems fairly happy.

-J


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CMake config for OpenVRML plugin - debug vs release libs

2007-09-10 Thread Luigi Calori
Jean-Sébastien Guay wrote:

> Hello Luigi,
>
>> Sorry I am on a really slow connection now, so just hints, I can not 
>> test:
>
>
> That's fine, thanks for helping even in less than optimal work 
> conditions :-)
>
>> The idea is that TARGET_ADDED_LIBRARIES is interpreted by SETUP_PLUGIN
>> macro as a list of undifferentiated external lib libraries to link to
>
>
> I had to replace TARGET_ADDED_LIBRARIES with  
> TARGET_EXTERNAL_LIBRARIES, otherwise CMake would complain that it  
> doesn't know how to make the library... I think that was just because  
> of the "untested" disclaimer you put in your message :-)

A typo... sorry.

>
>> TARGET_LIBRARIES_VARS is interpreted as a list of variable names, the
>> simple name is intended to hold the library to iln in optimizemed mode,
>> the var with _DEBUG appended holds the lib name to use in debug mode.
>
>
> That works well, except for one thing. CMake seems to not use the  
> debug version of the OpenVRML library (given as OPENVRML_LIBRARY and  
> OPENVRML_LIBRARY_DEBUG in FindOpenVRML.cmake) in the debug linker  
> properties... I have no idea why. I can see in the CMake dialog that  
> the right library is specified (openvrml.lib for release,  
> openvrmld.lib for debug) but after doing configure+generate, it's  
> openvrml.lib in both release and debug in the Visual C++ linker  
> properties.
>
> The weird thing is that ANTLR_LIBRARY and REGEX_LIBRARY work well for  
> release and debug... It's just OPENVRML_LIBRARY that doesn't work. Is  
> it FindOpenVRML.cmake that has a problem? I'm including both files  
> just to see if you can spot what's wrong...

Try deleting the cache, I think the Find stuff does not recompute if the 
variable is in cache

Hope it helps

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


[osg-users] Embedded Callbacks

2007-09-10 Thread Appolloni, Thomas
I'm working on a system with several 100,000 separate items for
rendering. So, they are being added to the scenegraph via PagedLOD's
since each was originally created as a separate geometry file and later
spatially partitioned at higher levels to reduce the number of actual
distance evaluations. However, our system (using OSG 2.0) allows the
user to dynamically alter the ranges within the LOD's children for each
of the varying object types. For those nodes in memory, it's not a
problem to adjust the ranges via a NodeVisitor traversal when the
changes are activated. The problem is with the nodes that will later
load. 

Is there a way to either:
1) include a callback in a node when it's first written to disk so that
it can be activated during its first traversal, get the updated range
changes, and then remove the callback from the node? 
Or
2) externally tie into osgDB::readNodeFile() to dynamically add the
callback after the actual load when the nodes are loaded in viewer? 

Once a node is updated, keeping the callbacks active serves no purpose
and eats a lot of update time.

Tom Appolloni, 
[EMAIL PROTECTED] 
Harris Corp (www.harris.com)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CMake config for OpenVRML plugin - debug vs release libs

2007-09-10 Thread Jean-Sébastien Guay

Hello Luigi,


Sorry I am on a really slow connection now, so just hints, I can not test:


That's fine, thanks for helping even in less than optimal work conditions :-)


The idea is that TARGET_ADDED_LIBRARIES is interpreted by SETUP_PLUGIN
macro as a list of undifferentiated external lib libraries to link to


I had to replace TARGET_ADDED_LIBRARIES with  
TARGET_EXTERNAL_LIBRARIES, otherwise CMake would complain that it  
doesn't know how to make the library... I think that was just because  
of the "untested" disclaimer you put in your message :-)



TARGET_LIBRARIES_VARS is interpreted as a list of variable names, the
simple name is intended to hold the library to iln in optimizemed mode,
the var with _DEBUG appended holds the lib name to use in debug mode.


That works well, except for one thing. CMake seems to not use the  
debug version of the OpenVRML library (given as OPENVRML_LIBRARY and  
OPENVRML_LIBRARY_DEBUG in FindOpenVRML.cmake) in the debug linker  
properties... I have no idea why. I can see in the CMake dialog that  
the right library is specified (openvrml.lib for release,  
openvrmld.lib for debug) but after doing configure+generate, it's  
openvrml.lib in both release and debug in the Visual C++ linker  
properties.


The weird thing is that ANTLR_LIBRARY and REGEX_LIBRARY work well for  
release and debug... It's just OPENVRML_LIBRARY that doesn't work. Is  
it FindOpenVRML.cmake that has a problem? I'm including both files  
just to see if you can spot what's wrong...


Thanks,

J-S
--
__
Jean-Sebastien Guay [EMAIL PROTECTED]
http://whitestar02.webhop.org/


This message was sent using IMP, the Internet Messaging Program.

# Locate openvml library
# This module defines
# OPENVRML_LIBRARY
# OPENVRML_FOUND, if false, do not try to link to vrml 
# OPENVRML_INCLUDE_DIR, where to find the headers
#
# $OPENVRML_DIR is an environment variable that would
# correspond to the ./configure --prefix=$OPENVRML_DIR
#
# Created by Robert Osfield. 

FIND_PATH(OPENVRML_INCLUDE_DIR openvrml/openvrml/common.h
$ENV{OPENVRML_DIR}/include
$ENV{OPENVRML_DIR}
$ENV{OSGDIR}/include
$ENV{OSGDIR}
$ENV{OSG_ROOT}/include
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ 
Manager\\Environment;OSG_ROOT]/include
/usr/freeware/include
)

FIND_LIBRARY(OPENVRML_LIBRARY 
NAMES openvrml
PATHS
$ENV{OPENVRML_DIR}/lib
$ENV{OPENVRML_DIR}
$ENV{OSGDIR}/lib
$ENV{OSGDIR}
$ENV{OSG_ROOT}/lib
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ 
Manager\\Environment;OSG_ROOT]/lib
/usr/freeware/lib64
)

SET(OPENVRML_LIBRARY_DEBUG "${OPENVRML_LIBRARY}d")
#FIND_LIBRARY(OPENVRML_LIBRARY_DEBUG 
#NAMES openvrmld
#PATHS
#$ENV{OPENVRML_DIR}/lib
#$ENV{OPENVRML_DIR}
#$ENV{OSGDIR}/lib
#$ENV{OSGDIR}
#$ENV{OSG_ROOT}/lib
#~/Library/Frameworks
#/Library/Frameworks
#/usr/local/lib
#/usr/lib
#/sw/lib
#/opt/local/lib
#/opt/csw/lib
#/opt/lib
#[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ 
Manager\\Environment;OSG_ROOT]/lib
#/usr/freeware/lib64
#)

SET(OPENVRML_FOUND "NO")
IF(OPENVRML_LIBRARY AND OPENVRML_INCLUDE_DIR)
SET(OPENVRML_FOUND "YES")
ENDIF(OPENVRML_LIBRARY AND OPENVRML_INCLUDE_DIR)


IF (WIN32)
INCLUDE_DIRECTORIES( ${OPENVRML_INCLUDE_DIR} 
${OPENVRML_INCLUDE_DIR}/openvrml ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} 
${ZLIB_INCLUDE_DIR})
SET(OPENVRML_ANTLR_LIBRARY   antlr.lib)
SET(OPENVRML_ANTLR_LIBRARY_DEBUG antlrd.lib)
SET(OPENVRML_REGEX_LIBRARY   regex.lib)
SET(OPENVRML_REGEX_LIBRARY_DEBUG regexd.lib)
SET(TARGET_LIBRARIES_VARS OPENVRML_ANTLR_LIBRARY OPENVRML_REGEX_LIBRARY 
OPENVRML_LIBRARY JPEG_LIBRARY PNG_LIBRARY ZLIB_LIBRARY)
SET(TARGET_EXTERNAL_LIBRARIES Ws2_32.lib)
ELSE(WIN32)
INCLUDE_DIRECTORIES( ${OPENVRML_INCLUDE_DIR} 
${OPENVRML_INCLUDE_DIR}/openvrml)
SET(TARGET_LIBRARIES_VARS OPENVRML_LIBRARY)
ENDIF(WIN32)

SET(TARGET_SRC ReaderWriterVRML2.cpp )

 end var setup  ###
SETUP_PLUGIN(vrml)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem with makeCurrent implementation in osgViewer

2007-09-10 Thread Roger James


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of Robert Osfield
> Sent: 10 September 2007 15:48
> To: Public OpenSceneGraph Users discussion list.
> I don't know the source of your problem, the existing osgviewerWX
> works fine, as to what you've done different I don't have time to
> reproduce all things myself.  If there are areas in osgViewer::Viewer
> that could be changed to help you particular usage/misusage style then
> I'm open to suggests of changes - perhaps a method to say that the
> graphics context has been taken by another thread would be sufficient.
> 
> Robert.

Robert,

I would not dream of asking you to reproduce it. I have a working fix,
that's all I need. I am sure you have more many other things to do. I really
do appreciate the immense effort you put in.

Roger

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


Re: [osg-users] Problem with makeCurrent implementation in osgViewer

2007-09-10 Thread Robert Osfield
On 9/10/07, Roger James <[EMAIL PROTECTED]> wrote:
> I flagged this up because it seems rather a bold assumption to make that a
> single instance of an osgViewer object is in control of all the OpenGL
> rendering contexts that might be in use by an application. Am I correct in
> my assumption that an application uses more than one osgViewer object will
> also suffer from the same problems.

osgViewer::Viewer makes no such bold assumptions.  You can handle a
range of graphics contexts across a range of views/viewers from a
range of graphics threads - as long as you play be the rules.

However, it does make an assumption that you have separate threads
that are grabbing the context from the existing graphics threads -
i.e. if you don't play be the rules then things will come unstuck.

I don't know the source of your problem, the existing osgviewerWX
works fine, as to what you've done different I don't have time to
reproduce all things myself.  If there are areas in osgViewer::Viewer
that could be changed to help you particular usage/misusage style then
I'm open to suggests of changes - perhaps a method to say that the
graphics context has been taken by another thread would be sufficient.

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


Re: [osg-users] Problem with makeCurrent implementation in osgViewer

2007-09-10 Thread Roger James
Hi Robert,

Thanks for the quick reply. My app is single threaded. I have implemented a
work around using an explicit makeCurrent on the viewer's current camera's
graphicsContext. I could not see a simple way of dirtying the viewer in a
way that did not cause an erroneous releaseContext on a context that was not
really current.

I flagged this up because it seems rather a bold assumption to make that a
single instance of an osgViewer object is in control of all the OpenGL
rendering contexts that might be in use by an application. Am I correct in
my assumption that an application uses more than one osgViewer object will
also suffer from the same problems.

I have a vague recollection that this may have been already discussed, if so
my apologies.

Roger

P.S. just an aside, is there any reason for this duplication

inline void releaseContext()
{
if (_currentContext.valid() && _currentContext->valid())

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of Robert Osfield
> Sent: 10 September 2007 14:21
> To: Public OpenSceneGraph Users discussion list.
> Subject: Re: [osg-users] Problem with makeCurrent implementation in
> osgViewer
> 
> Hi Roger,
> 
> If your app makes the context current in a different thread than
> osgViewer has for rendering to the same graphics context without
> osgViewer knowing about the fact that the context has been stolen from
> underneath it then it is not suprising you'll find problems.
> 
> You'll need to either add an explicit makeCurrent to make sure the
> context is current, or dirty the Viewer in some way so it doesn't
> assume that the context is current anymore.
> 
> Robert.
> 
> On 9/10/07, Roger James <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> > In my previous posts "[osg-users] Help - trying to get a wxWidgets
> > implementation ofosgViewer::Viewer working!" I described a problem with
> the
> > viewer scene not being updated.
> >
> >
> >
> > I have now tracked this down to the implementation of makeCurrent in
> > osgViewer. My application renders an osg scene in its main window using
> osg
> > but not using osgViewer. osgViewer is used to render an additional scene
> in
> > a pop up window. If I disable the rendering of the main scene whilst the
> pop
> > up is being displayed all works fine. However if I allow the main window
> > rendering loop to run the pop up window is drawn once and then not
> updated.
> > This is because the OpenGL rendering context has been set back that of
> the
> > main window and this change is not being detected. The following check
> in
> > makeCurrent only makes a change if the osg::GraphicsContext the viewer
> knows
> > about is not the current osg::GraphicsContext the viewer knows. This
> does
> > not wok is the current rendering context is not encapsulated in an
> > osg::Graphics context that this viewer object knows about.
> >
> >
> >
> > inline void makeCurrent(osg::GraphicsContext* gc)
> >
> > {
> >
> > if (_currentContext==gc) return;
> >
> >
> >
> > releaseContext();
> >
> >
> >
> > if (gc && gc->valid() && gc->makeCurrent()) _currentContext
> =
> > gc;
> >
> > }
> >
> >
> >
> > This used to work in SimpleViewer which I assume made an unconditional
> > context switch on each frame. This means that the current implementation
> > will not work if an application uses OpenGL contexts that are not
> > encapsulated by an osg::GraphicsContext. I assume that it also means
> that
> > even if the context is encapsulated it will have to be on the list for a
> > particular viewer object for things to work, although I have not checked
> > this.
> >
> >
> >
> > I have got a work around by unconditionally calling makeCurrent before
> > calling frame in the idle  loop.
> >
> >
> >
> > Robert, is my analysis correct?
> >
> >
> >
> > Roger
> > ___
> > 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] Problem with makeCurrent implementation in osgViewer

2007-09-10 Thread Robert Osfield
Hi Roger,

If your app makes the context current in a different thread than
osgViewer has for rendering to the same graphics context without
osgViewer knowing about the fact that the context has been stolen from
underneath it then it is not suprising you'll find problems.

You'll need to either add an explicit makeCurrent to make sure the
context is current, or dirty the Viewer in some way so it doesn't
assume that the context is current anymore.

Robert.

On 9/10/07, Roger James <[EMAIL PROTECTED]> wrote:
>
>
>
>
> In my previous posts "[osg-users] Help - trying to get a wxWidgets
> implementation ofosgViewer::Viewer working!" I described a problem with the
> viewer scene not being updated.
>
>
>
> I have now tracked this down to the implementation of makeCurrent in
> osgViewer. My application renders an osg scene in its main window using osg
> but not using osgViewer. osgViewer is used to render an additional scene in
> a pop up window. If I disable the rendering of the main scene whilst the pop
> up is being displayed all works fine. However if I allow the main window
> rendering loop to run the pop up window is drawn once and then not updated.
> This is because the OpenGL rendering context has been set back that of the
> main window and this change is not being detected. The following check in
> makeCurrent only makes a change if the osg::GraphicsContext the viewer knows
> about is not the current osg::GraphicsContext the viewer knows. This does
> not wok is the current rendering context is not encapsulated in an
> osg::Graphics context that this viewer object knows about.
>
>
>
> inline void makeCurrent(osg::GraphicsContext* gc)
>
> {
>
> if (_currentContext==gc) return;
>
>
>
> releaseContext();
>
>
>
> if (gc && gc->valid() && gc->makeCurrent()) _currentContext =
> gc;
>
> }
>
>
>
> This used to work in SimpleViewer which I assume made an unconditional
> context switch on each frame. This means that the current implementation
> will not work if an application uses OpenGL contexts that are not
> encapsulated by an osg::GraphicsContext. I assume that it also means that
> even if the context is encapsulated it will have to be on the list for a
> particular viewer object for things to work, although I have not checked
> this.
>
>
>
> I have got a work around by unconditionally calling makeCurrent before
> calling frame in the idle  loop.
>
>
>
> Robert, is my analysis correct?
>
>
>
> Roger
> ___
> 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] Problem with makeCurrent implementation in osgViewer

2007-09-10 Thread Roger James
In my previous posts "[osg-users] Help - trying to get a wxWidgets
implementation ofosgViewer::Viewer working!" I described a problem with the
viewer scene not being updated.

 

I have now tracked this down to the implementation of makeCurrent in
osgViewer. My application renders an osg scene in its main window using osg
but not using osgViewer. osgViewer is used to render an additional scene in
a pop up window. If I disable the rendering of the main scene whilst the pop
up is being displayed all works fine. However if I allow the main window
rendering loop to run the pop up window is drawn once and then not updated.
This is because the OpenGL rendering context has been set back that of the
main window and this change is not being detected. The following check in
makeCurrent only makes a change if the osg::GraphicsContext the viewer knows
about is not the current osg::GraphicsContext the viewer knows. This does
not wok is the current rendering context is not encapsulated in an
osg::Graphics context that this viewer object knows about.

 

inline void makeCurrent(osg::GraphicsContext* gc)

{

if (_currentContext==gc) return;



releaseContext();



if (gc && gc->valid() && gc->makeCurrent()) _currentContext =
gc;

}

 

This used to work in SimpleViewer which I assume made an unconditional
context switch on each frame. This means that the current implementation
will not work if an application uses OpenGL contexts that are not
encapsulated by an osg::GraphicsContext. I assume that it also means that
even if the context is encapsulated it will have to be on the list for a
particular viewer object for things to work, although I have not checked
this.

 

I have got a work around by unconditionally calling makeCurrent before
calling frame in the idle  loop.

 

Robert, is my analysis correct?

 

Roger

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


Re: [osg-users] PagedLOD preprocessing

2007-09-10 Thread PCJohn
>> The scene contains 3GB of textures (or any higher number).
>> My idea was to make PagedLOD scene that would load high-resolution
>> textures only for the most close scene parts to the camera.
> 
> 3GB is not overly large, and the reason for PageLOD existance is
> helping handle this and much large scenes.

Cool! I am looking forward to test it on much larger data sets.

>> The problem is clear: OSG would probably freeze the computer during
>> preprocessing when loading all the textures. In Inventor, it seemd
>> simple: just to override the texture type and make the implementation
>> not to load texture data. Any chance for solution in OSG?
> 
> There every chance of a solution in the OSG, first up you load the
> data, for instance do it incrementally, and then to generate the LOD
> levels as required.  This is a tasks for you to work out though - the
> OSG is a scene graph rather than a modelling tool.

Surely, I already started on algorithms by myself. But what are the
possibilities of loading the scene data to not burn all free memory?
I am guessing there are two approaches:

   - You mentioned incremental loading - but I do not see any possibility
 to break in to the load-at-once algorithms of osgDB::Registry,
 ReaderWriterOSG, and their friends

   - override of loading algorithms of PluginOSG for Texture class,
 although I am not sure if it is possible to do so

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


[osg-users] osgviewerFLTK hangs at exit

2007-09-10 Thread Paul Melis
Hello,
This is with this mornings' SVN version and FLTK 1.1.6 on FC4. When 
exiting the osgviewerFLTK example (run with cow.osg as argument) with 
escape it hangs with the following strace when attaching to the process:

...
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
select(5, [4], [], [], {0, 0})  = 0 (Timeout)
select(5, [4], [], [], {0, 0})  = 0 (Timeout)
sched_yield()   = 0
select(5, [4], [], [], {0, 0})  = 0 (Timeout)
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
select(5, [4], [], [], {0, 0})  = 0 (Timeout)
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
select(5, [4], [], [], {0, 0})  = 0 (Timeout)
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
select(5, [4], [], [], {0, 0})  = 0 (Timeout)
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0
sched_yield()   = 0


I haven't got a clue what's going on here, perhaps something 
threading-related? One awkward thing I noticed is that when I give the 
cow a good spin and try to exit it seems that there's two or more frames 
being drawn repeatedly from the moment the lockup occurs. The image 
jitters, almost like a camcorder movie with horrible interlacing.

All of the other window toolkit related samples work fine. Small thingy: 
osgviewerWX is the only one that doesn't ask for a model file as 
command-line argument.

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


Re: [osg-users] Difference between Viewer+SlaveCamera and CompositeViewer

2007-09-10 Thread sicong he
Please see osgViewer application. The osgGA::StateSetManipulator() may help
you~

2007/9/10, Felix Bwire <[EMAIL PROTECTED]>:
>
> Hi all,
> has anyone produced code that outputs a graph with just points(nodes) and
> links (edges) to these nodes. If so, you code please let me know how to do
> it.
>
> Thanks,
> Felix
>
> On 9/7/07, Robert Osfield <[EMAIL PROTECTED]> wrote:
> >
> > On 9/7/07, Alberto Luaces <[EMAIL PROTECTED]> wrote:
> > > Thank you very much for your complete reply, it will help me to design
> > my
> > > future programs.
> >
> > My hope is that the amount of commonality between Viewer,
> > CompositeViewer and doing Camera's in the scene graph is that users
> > can switch between different high level designs easily, and reuse as
> > much knowledge and actual code as possible.  So...  if you find out
> > your design could be better done another way it should be easy to just
> > reconfigure things..  at leasts that's the theory :-)
> >
> > 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
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Difference between Viewer+SlaveCamera and CompositeViewer

2007-09-10 Thread Felix Bwire
Hi all,
has anyone produced code that outputs a graph with just points(nodes) and
links (edges) to these nodes. If so, you code please let me know how to do
it.

Thanks,
Felix

On 9/7/07, Robert Osfield <[EMAIL PROTECTED]> wrote:
>
> On 9/7/07, Alberto Luaces <[EMAIL PROTECTED]> wrote:
> > Thank you very much for your complete reply, it will help me to design
> my
> > future programs.
>
> My hope is that the amount of commonality between Viewer,
> CompositeViewer and doing Camera's in the scene graph is that users
> can switch between different high level designs easily, and reuse as
> much knowledge and actual code as possible.  So...  if you find out
> your design could be better done another way it should be easy to just
> reconfigure things..  at leasts that's the theory :-)
>
> 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] PagedLOD preprocessing

2007-09-10 Thread Robert Osfield
Hi John,

On 9/10/07, PCJohn <[EMAIL PROTECTED]> wrote:
> Is there a chance to preprocess scene by OSG to use PagedLOD?

Yes, but you'll need to write the database conversion yourself.  The
osgpagelod example may help a bit as this converts LODs to PagedLODs.

> The scene contains 3GB of textures (or any higher number).
> My idea was to make PagedLOD scene that would load high-resolution
> textures only for the most close scene parts to the camera.

3GB is not overly large, and the reason for PageLOD existance is
helping handle this and much large scenes.

> The problem is clear: OSG would probably freeze the computer during
> preprocessing when loading all the textures. In Inventor, it seemd
> simple: just to override the texture type and make the implementation
> not to load texture data. Any chance for solution in OSG?

There every chance of a solution in the OSG, first up you load the
data, for instance do it incrementally, and then to generate the LOD
levels as required.  This is a tasks for you to work out though - the
OSG is a scene graph rather than a modelling tool.

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


Re: [osg-users] osgmanipulator example questions

2007-09-10 Thread sicong he
I tried by best and I found a way to solve thi problem.
The idea is:
First see the scene structure:

SceneRoot
Teapot01 Box01

Teapot01 and Box01 are the children of SceneRoot.
When I select "Teapot01", the osgManipulator::selection (I call it in my
program Selection) set Teapot01 as one if its children.
Then I find all the parents of Teapot01, in this example, is SceneRoot and
Selection.
Then I replace the Teapot01 child of SceneRoot with Selection. Now the scene
structure is:

SceneRoot
Selection  Box01
Teapot01

And then I connect the dragger with Selection. All things go right.
When Box01 is selected, I replace the Selection child of SceneRoot with
Teapot01 and calculate the matrix of Teapot01.
The matrix of Selection is also reset. Then repeat the above steps to make
Box01 dragable.

My demo program and test scene is attached. If you have better ideas, please
tell me! Thanks in advanced!

2007/9/10, David Callu <[EMAIL PROTECTED]>:
>
> Hi,
>
>
> Can you send the osgmanipulator.cpp modified and your scene to test?
>
> David Callu
>
> 2007/9/10, hesicong2006 <[EMAIL PROTECTED] >:
> >
> > I know why. root should add an Child include the scene.
> >
> > But another question. I can drag the Teapot01, but the whole scene now
> > has two "Teapot". Then how can I fix it?
> >
> > hesicong2006 wrote:
> > > Hi, Robert
> > > Someday before I asked a question about drag object in OSG and you
> > told
> > > me to see osgmanipulator example. It's great.
> > > I tried to modify it as I want to move one object in the scene but the
> > > whole scene. I tried to do this in addDraggerToScene function:
> > >
> > > osg::Node* addDraggerToScene(osg::Node* scene,
> > > osgManipulator::CommandManager* cmdMgr, const std::string& name)
> > > {
> > >scene->getOrCreateStateSet()->setMode(GL_NORMALIZE,
> > > osg::StateAttribute::ON);
> > >
> > >osg::Node* selectedObject=FindByName("Teapot01");
> > >
> > >osgManipulator::Selection* selection = new
> > osgManipulator::Selection;
> > >selection->addChild(selectedObject);
> > >
> > >osgManipulator::Dragger* dragger = createDragger(name);
> > >
> > >osg::Group* root = new osg::Group;
> > >root->addChild(dragger);
> > >root->addChild(selection);
> > >root->addChild(createHUD());
> > >
> > >float scale = selectedObject->getBound().radius() * 1.6;
> > >dragger->setMatrix(osg::Matrix::scale(scale, scale, scale) *
> > >
> > > osg::Matrix::translate(selectedObject->getBound().center()));
> > >cmdMgr->connect(*dragger, *selection);
> > >
> > >return root;
> > > }
> > >
> > >
> > > And here my scene has two objects, one teapot, one box. But when I run
> >
> > > the program, I see only the "Teapot01" which really can drag and move,
> > > but the box is lost!
> > > I don't know how to only move one object in the scene. Please give me
> > > some ideas. Thanks.
> > >
> > >
> >
> > ___
> > 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
>
>


NativePick.rar
Description: Binary data
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgmanipulator example questions

2007-09-10 Thread David Callu
Hi,


Can you send the osgmanipulator.cpp modified and your scene to test?

David Callu

2007/9/10, hesicong2006 <[EMAIL PROTECTED]>:
>
> I know why. root should add an Child include the scene.
>
> But another question. I can drag the Teapot01, but the whole scene now
> has two "Teapot". Then how can I fix it?
>
> hesicong2006 wrote:
> > Hi, Robert
> > Someday before I asked a question about drag object in OSG and you told
> > me to see osgmanipulator example. It's great.
> > I tried to modify it as I want to move one object in the scene but the
> > whole scene. I tried to do this in addDraggerToScene function:
> >
> > osg::Node* addDraggerToScene(osg::Node* scene,
> > osgManipulator::CommandManager* cmdMgr, const std::string& name)
> > {
> >scene->getOrCreateStateSet()->setMode(GL_NORMALIZE,
> > osg::StateAttribute::ON);
> >
> >osg::Node* selectedObject=FindByName("Teapot01");
> >
> >osgManipulator::Selection* selection = new osgManipulator::Selection;
> >selection->addChild(selectedObject);
> >
> >osgManipulator::Dragger* dragger = createDragger(name);
> >
> >osg::Group* root = new osg::Group;
> >root->addChild(dragger);
> >root->addChild(selection);
> >root->addChild(createHUD());
> >
> >float scale = selectedObject->getBound().radius() * 1.6;
> >dragger->setMatrix(osg::Matrix::scale(scale, scale, scale) *
> >
> > osg::Matrix::translate(selectedObject->getBound().center()));
> >cmdMgr->connect(*dragger, *selection);
> >
> >return root;
> > }
> >
> >
> > And here my scene has two objects, one teapot, one box. But when I run
> > the program, I see only the "Teapot01" which really can drag and move,
> > but the box is lost!
> > I don't know how to only move one object in the scene. Please give me
> > some ideas. Thanks.
> >
> >
>
> ___
> 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] PagedLOD preprocessing

2007-09-10 Thread PCJohn
Hi,

advanced problem:

Is there a chance to preprocess scene by OSG to use PagedLOD?
The scene contains 3GB of textures (or any higher number).
My idea was to make PagedLOD scene that would load high-resolution 
textures only for the most close scene parts to the camera.

The problem is clear: OSG would probably freeze the computer during 
preprocessing when loading all the textures. In Inventor, it seemd 
simple: just to override the texture type and make the implementation 
not to load texture data. Any chance for solution in OSG?

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


Re: [osg-users] How to implemente this simple function?

2007-09-10 Thread Robert Osfield
osg::Camera subclasses from osg::CullSettings so you can do:

viewer.getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);

On 9/10/07, 方之 <[EMAIL PROTECTED]> wrote:
> Hello Mr Wang:
>I want to know how to use cullingsetting class, can you gave me a simple
> example?
>PS:Are you in China/
>
>  ShiTou
>
> 2007 9 10
>
> />May be you need to disable autoComputeNearFar for a camera.
> />Don't apologize for your poor en , cause they may also poor in CH...hehe
> />  - Original Message -
> />  From: ??
> />  To: osg-users@lists.openscenegraph.org
> />  Sent: Sunday, September 09, 2007 11:57 PM
> />  Subject: [osg-users] How to implemente this simple function?
> />
> />
> />  Hello all :
> />I want to implemente this function, only to render the fixed distance
> from the viewer current />position, and I can't use the
> getProjectionMatrixAsFrustum function correct:
> />
> />  I use the following codes, but the result is very strange:
> />
> />  viewer ->getCamera()
> ->setProjectionMatrixAsFrustum(-10,10,-10,10,100,200) ;
> />
> />  I want the viewer only to render the distance between 100 and 200 from
> the viewer current position.
>
> />/>  I will gratitude for giving me some Tutorials
> />  . Sorry for my poor EN.
> />
>  ShiTou
> />
>   2007.9.9
>
>
>
>
>
>  
>  独有"账号保险柜"保护密码,"瑞星08版"开始免费
> ___
> 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