Re: [osg-users] I want to read one pixel from a texture in video memory, back to system memory.

2008-08-04 Thread Viggo Løvli

Hi Art,
 
I took a look into the UnitOutCapture.cpp file. It uses the 
Image::readImageFromCurrentTexture function. I assume it reads the entire 
texture back to system-memory. I may be able to use that... But, I assume that 
if I send a compressed texture to video-memory, then I will get a compressed 
texture back. The Image::getColor function does not support compressed textures.
 
I have written a node-visitor that prevents OSG from deleting the Image 
pointers of textures in node-files that my application reads, so I have solved 
my problem as long as I am not using compressed textures. My hope now is that 
IF my program encounters a compressed texture then it would be able to read a 
pixel from video-memory through glReadPixels. That function is capable of 
reading only one pixel or a few pixels, so I assume that reading from a 
compressed texture means that it will decompress in order to read the pixel. 
Doing so would make my intersection code robust as it would handle node-files 
that contain compressed images.
 
Cheers,
Viggo
 From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Date: Fri, 1 
 Aug 2008 13:45:03 +0200 Subject: Re: [osg-users] I want to read one pixel 
 from a texture in video memory, back to system memory.  Hi Viggo,  Have 
 you tried to setup the glReadBuffer properly first.  Take a look into 
 osgPPU, this has already the functionality to read from  textures 
 (UnitOutCapture) and to be used for post-processing calculation like  you 
 have.  Maybe this could help you to solve the problem.  Best regards, 
 Art   On Thursday 31 July 2008 08:48:19 Viggo Løvli wrote:  Hi,   I 
 am trying to write an intersect post-processing function that will read  
 the alpha value of the hit-location. I have so far managed to get the  
 texture coordinates for each collision point. I have also managed to find  
 which texture (in unit 0) that is used by the object that I collide with.  
  I have a pointer to the texture:  osg::Texture2D* texture;   The 
 scene I am intersecting is read from a pre-created file and all  osgImage 
 data is automatically deleted. So, I can not always use  
 texture-getImage() and read the pixels from there.   In the cases where 
 getImage returns a NULL pointer:  osg::Texture::TextureObject* to = 
 texture-getTextureObject( 0 );  glBindTexture( GL_TEXTURE_2d, to-_id ); 
  unsigned char data[4];  glReadPixels( xLocation, yLocation, 1, 1, 
 GL_RGBA, GL_UNSIGNED_BYTE,  data ); glBindTexture( GL_TEXTURE_2D, 0 );  
  This code compiles and it runs. The problem is that it always returns the 
  same values for RGB and A, nomatter what my xLocation and yLocation is.  
  Can anybody see what I am doing wrong?   Regards,  Viggo   
 _  Morsomme 
 klipp, kjendiser og mer på MSN Video.  
 http://video.msn.com/?mkt=nb-nofrom=HMTAG   
 ___ osg-users mailing list 
 osg-users@lists.openscenegraph.org 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_
Hold kontakten med Windows Live Messenger.
http://clk.atdmt.com/GBL/go/msnnkdre001003gbl/direct/01/___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] glGetString returning NULL

2008-08-04 Thread Serge Lages
Hi Robert,

It seems this modification has broke the Compile Contexts (see my post Win32
problems with CompileContext).
Currently an application setted to use compile contexts crash with a
glGetString call.

On Sun, Aug 3, 2008 at 3:30 PM, Robert Osfield [EMAIL PROTECTED]wrote:

 Hi Sherman et. al,

 The reason for the different in SVN head/2.6.0 is that by default the
 Viewer::renderingTraversals() now does a release context, this is done
 to fix a problem that was occuring when users were serializing
 multiple multiple viewers in a single frame loop - so had multiple
 calls to renderinTraversals() on different windows.  In ViewerBase
 you'll now find:

/** Hint to tell the renderingTraversals() method whether to
 call relaseContext() on the last
  * context that was made current by the thread calling
 renderingTraverals().  Note, when
  * running multi-threaded viewer no threads will be made
 current or release current.
  * Setting this hint to false can enable the frame loop to be
 lazy about calling makeCurrent
  * and releaseContext on each new frame, helping performance.
  However, if you frame loop
  * is managing multiple graphics context all from the main
 frame thread then this hint must
  * be left on, otherwise the wrong context could be left
 active, introducing errors in rendering.*/
void setReleaseContextAtEndOfFrameHint(bool hint) {
 _releaseContextAtEndOfFrameHint = hint; }

/** Hint to tell the renderingTraversals() method whether to
 call relaseContext().*/
bool getReleaseContextAtEndOfFrameHint() const { return
 _releaseContextAtEndOfFrameHint; }

 This allows you to switch off this release context if you wish, and
 then you'll still have the graphis context current when in Single
 Threaded rendering, however, I'd suggest to is not to considered a
 good practice as such code can easily be broken by changing the
 threading model.

 My recommendation is that all users avoid doing OpenGL calls directly
 in the frame loop, and instead use a Camera initial/pre/post/final
 draw callback to do extra OpenGL calls.  This approach works for all
 threading models and viewer configurations.

 Robert.

 On Thu, Jul 31, 2008 at 5:45 PM, Paul Martz [EMAIL PROTECTED]
 wrote:
  Thanks for the reply - I am running osgViewer in single threaded mode
  - still returns NULL. The drawable trick works as expected,
  but I don't understand why this doesn't work in the main
  render loop when in single threaded mode. I *think* this
  worked in 2.4. Almost positive.
  Anyway, here's a simple example. glGetString fails in the
  loop but succeeds in the drawable. Note the usage of single
  threaded mode. I'm not so concerned about having to move this
  code to a drawable, but perhaps this is indicative of a larger issue?
 
  I agree it seems odd that you don't have a current context in this case.
 To
  understand the issue, try setting a breakpoint at the MakeCurrent call;
  somewhere up the call stack, you should find an explanation for why it is
  being set to NULL each frame.
 
  Another option for you is to use a camera post draw callback; it is
 executed
  while the draw thread has a current context.
-Paul
 
  ___
  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




-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] The problem disappeared! (problem with osgUtil::LineSegmentIntersector) Make it please in the next version.

2008-08-04 Thread Robert Osfield
On Sun, Aug 3, 2008 at 9:21 PM, GMD GammerMaxyandex.ru
[EMAIL PROTECTED] wrote:
 I tested file. All works without errors). As KdTrees with or without.

Thanks for testing, I've now checked in this fix to svn/trunk and the
OpenSceneGraph-2.6 branch.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Behaviour of function osg::Image-getPixelSizeInBits() is strange.

2008-08-04 Thread Robert Osfield
Hi Max,

On Sun, Aug 3, 2008 at 9:26 PM, GMD GammerMaxyandex.ru
[EMAIL PROTECTED] wrote:
 I tried different formats (jpg / png / bmp) ... function getPixelSizeInBits() 
 returns values 64 !

I'm afraid this is no help to me, could you please provide the image
file that you think is problematic.

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


Re: [osg-users] VPB Status

2008-08-04 Thread Robert Osfield
Hi Ralf,

On Sun, Aug 3, 2008 at 10:12 PM, Ralf Stokholm [EMAIL PROTECTED] wrote:
 Thanks for the info, will the osga option be enabled again prior to the
 release of vpb 1.0?

osga files can't be built multi-threaded, the best we could do is
build individual tasks as .osga, or post process the data placing the
separate files into .osga.

 althoúgh the current works fine im having the problem
 that after my 600 G dataset has been created (30 Hours on my quad core) it
 took another roughly 15-20 hours to copy it to an external ESATA harddrive
 using robocopy. :-o

 I know this is propable only a problem on windows, but I know that windows
 really hate working on folder structures with multi million files, so one
 big archive really works in this respect.

I wouldn't recommend using Windows to build large databases, it's file
system really doesn't perform well for this type of work.

 As a workaround would increasing the --tile-image-size reduce the number of
 files for a similar size / detail dataset?

This would be robbing Peter to feed Paul...  the key thing with paged
database is the actual rendering performance, big tiles will lead to a
much higher chance of frame misses due to overly large texture objects
and display lists/vbo's.

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


Re: [osg-users] VPB

2008-08-04 Thread Robert Osfield
Hi Michael,

You'll need to use VPB SVN trunk against 2.6 RC1.   Once 2.6 is out
the door I'll make another dev release of VPB.

Robert.

On Mon, Aug 4, 2008 at 2:00 AM, Michael W. Hall [EMAIL PROTECTED] wrote:
 I have VPB 0.9.7 and OSG 2.6 RC1.  I am getting errors when building
 VPB.  They are as follows:

 /home/mwhall/Download/VirtualPlanetBuilder/src/vpb/Commandline.cpp: In
 member function 'void
 vpb::Commandline::processImageOrHeightField(vpb::Source::Type, const
 std::string)':
 /home/mwhall/Download/VirtualPlanetBuilder/src/vpb/Commandline.cpp:108:
 error: 'class osgTerrain::Terrain' has no member named
 'getNumColorLayers'
 /home/mwhall/Download/VirtualPlanetBuilder/src/vpb/Commandline.cpp:108:
 error: 'class osgTerrain::Terrain' has no member named 'getColorLayer'
 /home/mwhall/Download/VirtualPlanetBuilder/src/vpb/Commandline.cpp:116:
 error: 'class osgTerrain::Terrain' has no member named 'setColorLayer'
 /home/mwhall/Download/VirtualPlanetBuilder/src/vpb/Commandline.cpp:121:
 error: 'class osgTerrain::Terrain' has no member named
 'getElevationLayer'
 /home/mwhall/Download/VirtualPlanetBuilder/src/vpb/Commandline.cpp:129:
 error: 'class osgTerrain::Terrain' has no member named
 'setElevationLayer'
 /home/mwhall/Download/VirtualPlanetBuilder/src/vpb/Commandline.cpp: In
 member function 'int vpb::Commandline::read(std::ostream,
 osg::ArgumentParser, osgTerrain::Terrain*)':
 /home/mwhall/Download/VirtualPlanetBuilder/src/vpb/Commandline.cpp:505:
 error: 'class osgTerrain::Terrain' has no member named
 'getTerrainTechnique'
 /home/mwhall/Download/VirtualPlanetBuilder/src/vpb/Commandline.cpp:509:
 error: 'class osgTerrain::Terrain' has no member named
 'setTerrainTechnique'
 make[2]: *** [src/vpb/CMakeFiles/vpb.dir/Commandline.o] Error 1
 make[1]: *** [src/vpb/CMakeFiles/vpb.dir/all] Error 2
 make: *** [all] Error 2

 Any suggestions?  Should this version of VPB compile with 2.6?

 ___
 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] PAT and getWorldMatrices difference

2008-08-04 Thread Robert Osfield
On Mon, Aug 4, 2008 at 7:21 AM, Vincent Bourdier
[EMAIL PROTECTED] wrote:
 Hi Robert,

 Sorry if it was not understandable.

 My question is : why there is difference in the rotation when I get it from
 a PAT (attached under the root) or when I do a getWolrdMatrices on the same
 PAT

 Translation seems to be the same, but not rotation.

You ask me, how long is a piece of string that you are holding.

Can I answer this?  Without seeing the string??

No.

As for why your rotation is not what you are expecting, I also can't
answer this, it's your scene graph, only you have it in front of you.
My best guess is that you Transform above the PAT has a rotation in
it.

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


Re: [osg-users] PAT and getWorldMatrices difference

2008-08-04 Thread Vincent Bourdier
So you agree that it is not normal to have a difference in the rotation, if
no transform is above the PAT ?

thanks,

Regards
Vincent

2008/8/4 Robert Osfield [EMAIL PROTECTED]

 On Mon, Aug 4, 2008 at 7:21 AM, Vincent Bourdier
 [EMAIL PROTECTED] wrote:
  Hi Robert,
 
  Sorry if it was not understandable.
 
  My question is : why there is difference in the rotation when I get it
 from
  a PAT (attached under the root) or when I do a getWolrdMatrices on the
 same
  PAT
 
  Translation seems to be the same, but not rotation.

 You ask me, how long is a piece of string that you are holding.

 Can I answer this?  Without seeing the string??

 No.

 As for why your rotation is not what you are expecting, I also can't
 answer this, it's your scene graph, only you have it in front of you.
 My best guess is that you Transform above the PAT has a rotation in
 it.

 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] Removing colors and lighing from model?

2008-08-04 Thread Ariasgore
I have troubles to remove every color and every lighting from a loaded 
model, basically I want to  to draw a model completly white without any 
shading my code snippet is:


// state is a pointer to the group where the model will be added
state-setMode( GL_LIGHTING, osg::StateAttribute::OFF | 
StateAttribute::PROTECTED );

state-removeAttribute(StateAttribute::POLYGONMODE);
state-removeAttribute(StateAttribute::MATERIAL);
osg::Material* mat =  new osg::Material();
mat-setEmission(osg::Material::FRONT_AND_BACK, osg::Vec4(0.0,0.0,0.0,1.0));
state-setAttributeAndModes(mat, osg::StateAttribute::ON | 
StateAttribute::PROTECTED);


Basically I set the material as protected which should work but it doesnt 
for the models like axis.osg, or cessna.osg. Other model files from a model 
database are rendered white but these ones keep their color and their 
lighting.

Is there a way to fix that without visiting each node of the loaded models?

Thanks 


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


Re: [osg-users] glGetString returning NULL

2008-08-04 Thread Serge Lages
Some time ago (between the 2.2 and the 2.4 versions I think) I've made some
tests with compile contexts on Windows and it worked great. But I didn't use
them further because of some hardware limitations, but now for an other
project I would like to give it a try again.

On Mon, Aug 4, 2008 at 10:26 AM, Robert Osfield [EMAIL PROTECTED]wrote:

 Hi Serge,

 On Mon, Aug 4, 2008 at 9:09 AM, Serge Lages [EMAIL PROTECTED] wrote:
  It seems this modification has broke the Compile Contexts (see my post
 Win32
  problems with CompileContext).
  Currently an application setted to use compile contexts crash with a
  glGetString call.

 I'm not sure whether CompileContext has been confirmed to work under
 Windows, so it might just be co-incidence.  CompileContext's aren't
 managed through the main loop so are it's unlikely to be related.

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




-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Removing colors and lighing from model?

2008-08-04 Thread Robert Osfield
Hi ?? Could you please sign the name you wish to be addressed as.

As for your attempt at making your scene white, the problem is that
you are disabling lighting, and in OpenGL the glMaterial has no effect
when lighting is disabled, in this case only OpenGL vertex colours and
textures effect the colour of objects.  So enable lighting rather than
disable it.

Robert.

On Mon, Aug 4, 2008 at 9:57 AM, Ariasgore [EMAIL PROTECTED] wrote:
 I have troubles to remove every color and every lighting from a loaded
 model, basically I want to  to draw a model completly white without any
 shading my code snippet is:

 // state is a pointer to the group where the model will be added
 state-setMode( GL_LIGHTING, osg::StateAttribute::OFF |
 StateAttribute::PROTECTED );
 state-removeAttribute(StateAttribute::POLYGONMODE);
 state-removeAttribute(StateAttribute::MATERIAL);
 osg::Material* mat =  new osg::Material();
 mat-setEmission(osg::Material::FRONT_AND_BACK, osg::Vec4(0.0,0.0,0.0,1.0));
 state-setAttributeAndModes(mat, osg::StateAttribute::ON |
 StateAttribute::PROTECTED);

 Basically I set the material as protected which should work but it doesnt
 for the models like axis.osg, or cessna.osg. Other model files from a model
 database are rendered white but these ones keep their color and their
 lighting.
 Is there a way to fix that without visiting each node of the loaded models?

 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


Re: [osg-users] PAT and getWorldMatrices difference

2008-08-04 Thread Robert Osfield
On Mon, Aug 4, 2008 at 9:35 AM, Vincent Bourdier
[EMAIL PROTECTED] wrote:
 So you agree that it is not normal to have a difference in the rotation, if
 no transform is above the PAT ?

The line of questioning is what is not normal.

I can't say anything else about what you are doing/expecting.

The world transform code in the OSG *works* reliably a has done since
its introduction.

The PositionAttitudeTransform code in the OSG *works* reliably and has
done for many years.

The rest is is almost certainly just your own misunderstanding.  From
what you have written I really can't say where you're understanding
has gone of the road into the dirt.

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


Re: [osg-users] Removing colors and lighing from model?

2008-08-04 Thread Sam

I hope there will be a name now, otherwise call me Sam :)

The funny thing is that disabling light worked before on other models, while 
assigning emission color, the objects have color, no matter if lighting is 
on or off (actually it is not full white, but I am on it)


The other problem was solved by using the StatsVisitor (which I wanted to 
avoid). Traversing nodes clearing states and setting color arrays to 0 
helped.


Thanks
Sam

--
From: Robert Osfield [EMAIL PROTECTED]
Sent: Monday, August 04, 2008 11:23 AM
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Removing colors and lighing from model?


Hi ?? Could you please sign the name you wish to be addressed as.

As for your attempt at making your scene white, the problem is that
you are disabling lighting, and in OpenGL the glMaterial has no effect
when lighting is disabled, in this case only OpenGL vertex colours and
textures effect the colour of objects.  So enable lighting rather than
disable it.

Robert.

On Mon, Aug 4, 2008 at 9:57 AM, Ariasgore [EMAIL PROTECTED] wrote:

I have troubles to remove every color and every lighting from a loaded
model, basically I want to  to draw a model completly white without any
shading my code snippet is:

// state is a pointer to the group where the model will be added
state-setMode( GL_LIGHTING, osg::StateAttribute::OFF |
StateAttribute::PROTECTED );
state-removeAttribute(StateAttribute::POLYGONMODE);
state-removeAttribute(StateAttribute::MATERIAL);
osg::Material* mat =  new osg::Material();
mat-setEmission(osg::Material::FRONT_AND_BACK, 
osg::Vec4(0.0,0.0,0.0,1.0));

state-setAttributeAndModes(mat, osg::StateAttribute::ON |
StateAttribute::PROTECTED);

Basically I set the material as protected which should work but it doesnt
for the models like axis.osg, or cessna.osg. Other model files from a 
model

database are rendered white but these ones keep their color and their
lighting.
Is there a way to fix that without visiting each node of the loaded 
models?


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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Win32 problem with CompileContexts

2008-08-04 Thread Robert Osfield
Hi Serge,

I've been doing testing the compile context support using osgviewer on
paged database I have and it all works without error so far.  I'm
using Kubuntu 7.10 and 7800GT.  I enable compile contexts via:

  export OSG_COMPILE_CONTEXTS=ON
  osgviewer pagedmodel.ive --SingleThreaded

I tried the whole range of threading models without incident.

So this problem looks to be a Windows issue.  My guess is that the
error report of about a problem with make current is what is the early
warning of something not working quite right.  I'm afraid I can't do
much to investigate this myself though as I have no Windows box to
test against.

Robert.


On Thu, Jul 31, 2008 at 9:44 AM, Serge Lages [EMAIL PROTECTED] wrote:
 Hi all,

 I am currently trying to use CompileContexts on my application, but just
 doing this :

 osgViewer::Viewerviewer;

 viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
 osg::DisplaySettings::instance()-setCompileContextsHint(true);
 return (viewer.run());

 The application crash into glExtensions.cpp line 46 (trying to get the GL
 version with glGetString( GL_VERSION )).
 Before the crash I have this error message :

 PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: La
 ressource demandé est en cours d'utilisation.
 or in english something like that :
 PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: the
 wanted resource is already being used.

 Any idea on what's happening ?
 My system : WinXP with SVN head, VS 8 Express, NVIDIA 8600GTS

 Thanks in advance !

 --
 Serge Lages
 http://www.tharsis-software.com

 ___
 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] Plans for OpenSceneGraph-2.6.0-rc2

2008-08-04 Thread Adrian Egli OpenSceneGraph (3D)
OpenSceneGraph 2.6 works fine..

2008/8/4 Robert Osfield [EMAIL PROTECTED]

 Hi All,

 Yesterday I got svn trunk and the OpenSceneGraph-2.6 branch in sync,
 so both contain all the latest changes that Paul Martz merged with the
 2.6 branch, and the fixes I made yesterday and submissions made by the
 community up to this morning.

 Today I will be writing up the press release/NEWS.txt today, and
 looking at a few reported issues and tagging the 2.6.0-rc2 this
 afternoon.  Once I've updated the press release I'll ping the
 community to review it, given that my English writing skills aren't
 perfect this will be important ;-)

 It'd be great if 2.6-rc2 is good enough to make the final 2.6.0
 release, as this would allow us to get 2.6.0 out in the first half of
 this week, binaries made etc.  Judging by the low volume of fixes
 merged last week it would suggest either that 2.6.0-rc1 was already in
 pretty good shape, or that not enough testing has been carried out.  I
 do hope it's not the later But just in case...

 Please test the OpenSceneGraph-2.6 branch on as many machine/OS's that
 are available to you and let me know of success/failure so we can get
 things fixed as soon as possible.

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




-- 

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


[osg-users] Plans for OpenSceneGraph-2.6.0-rc2

2008-08-04 Thread Robert Osfield
Hi All,

Yesterday I got svn trunk and the OpenSceneGraph-2.6 branch in sync,
so both contain all the latest changes that Paul Martz merged with the
2.6 branch, and the fixes I made yesterday and submissions made by the
community up to this morning.

Today I will be writing up the press release/NEWS.txt today, and
looking at a few reported issues and tagging the 2.6.0-rc2 this
afternoon.  Once I've updated the press release I'll ping the
community to review it, given that my English writing skills aren't
perfect this will be important ;-)

It'd be great if 2.6-rc2 is good enough to make the final 2.6.0
release, as this would allow us to get 2.6.0 out in the first half of
this week, binaries made etc.  Judging by the low volume of fixes
merged last week it would suggest either that 2.6.0-rc1 was already in
pretty good shape, or that not enough testing has been carried out.  I
do hope it's not the later But just in case...

Please test the OpenSceneGraph-2.6 branch on as many machine/OS's that
are available to you and let me know of success/failure so we can get
things fixed as soon as possible.

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


Re: [osg-users] Win32 problem with CompileContexts

2008-08-04 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert,

i just come tested under windows vista, same as problem as Serge reported
:-(

PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: The
requested resource is in use.


2008/8/4 Robert Osfield [EMAIL PROTECTED]

 Hi Serge,

 I've been doing testing the compile context support using osgviewer on
 paged database I have and it all works without error so far.  I'm
 using Kubuntu 7.10 and 7800GT.  I enable compile contexts via:

  export OSG_COMPILE_CONTEXTS=ON
  osgviewer pagedmodel.ive --SingleThreaded

 I tried the whole range of threading models without incident.

 So this problem looks to be a Windows issue.  My guess is that the
 error report of about a problem with make current is what is the early
 warning of something not working quite right.  I'm afraid I can't do
 much to investigate this myself though as I have no Windows box to
 test against.

 Robert.


 On Thu, Jul 31, 2008 at 9:44 AM, Serge Lages [EMAIL PROTECTED]
 wrote:
  Hi all,
 
  I am currently trying to use CompileContexts on my application, but just
  doing this :
 
  osgViewer::Viewerviewer;
 
  viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
  osg::DisplaySettings::instance()-setCompileContextsHint(true);
  return (viewer.run());
 
  The application crash into glExtensions.cpp line 46 (trying to get the GL
  version with glGetString( GL_VERSION )).
  Before the crash I have this error message :
 
  PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: La
  ressource demandé est en cours d'utilisation.
  or in english something like that :
  PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: the
  wanted resource is already being used.
 
  Any idea on what's happening ?
  My system : WinXP with SVN head, VS 8 Express, NVIDIA 8600GTS
 
  Thanks in advance !
 
  --
  Serge Lages
  http://www.tharsis-software.com
 
  ___
  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




-- 

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


Re: [osg-users] Plans for OpenSceneGraph-2.6.0-rc2

2008-08-04 Thread Robert Osfield
On Mon, Aug 4, 2008 at 11:05 AM, Adrian Egli OpenSceneGraph (3D)
[EMAIL PROTECTED] wrote:
 OpenSceneGraph 2.6 works fine..

Thanks for the testing... but what platform configuration?? :-)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PAT and getWorldMatrices difference

2008-08-04 Thread Paul Melis

Hi Vincent,

Vincent Bourdier wrote:
My question is : why there is difference in the rotation when I get it 
from a PAT (attached under the root) or when I do a getWolrdMatrices 
on the same PAT


Translation seems to be the same, but not rotation.
You ask a question which can't really be answered in general. You need 
to show exactly what values you're getting and what you are expecting. 
Even better would be a very simple test program (or scene in .osg 
format) that demonstrates the problem.


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


Re: [osg-users] Behaviour of function osg::Image-getPixelSizeInBits() is strange.

2008-08-04 Thread GMD GammerMaxyandex.ru
ok. 

04.08.08, 12:12, Robert Osfield [EMAIL PROTECTED]:

 Hi Max,
 On Sun, Aug 3, 2008 at 9:26 PM, GMD GammerMaxyandex.ru
 [EMAIL PROTECTED] wrote:
  I tried different formats (jpg / png / bmp) ... function 
  getPixelSizeInBits() returns values 64 !
 I'm afraid this is no help to me, could you please provide the image
 file that you think is problematic.
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
Яндекс.Фотки - легко загрузить с мобильного http://mobile.yandex.ru/fotki/attachment: doska.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] What is K-tree?

2008-08-04 Thread Robert Osfield
On Mon, Aug 4, 2008 at 11:56 AM, GMD GammerMaxyandex.ru
[EMAIL PROTECTED] wrote:
 What is K-tree? I searched information about in the
Internet but found nothing. Could you give me some
links to the articles about this theme?

Try searching for KdTree or Kd-Tree...
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How can I use different shadow-map for different object.

2008-08-04 Thread GMD GammerMaxyandex.ru
How can I use different shadow-map for different object. 
For example, I have a big plane and two trees on it. When I 
put these 3 objects into one ShadowScene texture stretches too much.
Two ShadowScene doesn't work together, so I can't use more than one
texture by object.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How can I get know suuports video-card shaders or not?

2008-08-04 Thread GMD GammerMaxyandex.ru
How can I get know suuports video-card shaders or not?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] What is K-tree?

2008-08-04 Thread GMD GammerMaxyandex.ru
What is K-tree? I searched information about in the 
Internet but found nothing. Could you give me some 
links to the articles about this theme?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] What is K-tree?

2008-08-04 Thread Vincent Bourdier
try : http://en.wikipedia.org/wiki/Kd-tree

It is a good begining.

2008/8/4 Robert Osfield [EMAIL PROTECTED]

 On Mon, Aug 4, 2008 at 11:56 AM, GMD GammerMaxyandex.ru
 [EMAIL PROTECTED] wrote:
  What is K-tree? I searched information about in the
 Internet but found nothing. Could you give me some
 links to the articles about this theme?

 Try searching for KdTree or Kd-Tree...
 ___
 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] What is K-tree?

2008-08-04 Thread Joakim Simonsson

http://en.wikipedia.org/wiki/Kd_tree

På Mon, 04 Aug 2008 12:56:23 +0200, skrev GMD GammerMaxyandex.ru  
[EMAIL PROTECTED]:



What is K-tree? I searched information about in the
Internet but found nothing. Could you give me some
links to the articles about this theme?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




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


Re: [osg-users] WhatisK-tree?

2008-08-04 Thread GMD GammerMaxyandex.ru
Thanks.04.08.08, 15:12, "VincentBourdier" <[EMAIL PROTECTED] >:try : http://en.wikipedia.org/wiki/Kd-treeIt is a good begining.2008/8/4 Robert Osfield <[EMAIL PROTECTED]>On Mon, Aug 4, 2008 at 11:56 AM, GMD GammerMaxyandex.ru<[EMAIL PROTECTED]> wrote:> What is K-tree? I searched information about in the>        Internet but found nothing. Could you give me some>        links to the articles about this theme?Try searching for KdTree or Kd-Tree...___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org-- Яндекс.Почта - Проверьте почту с мобильного устройства: http://mail.ya.ru___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Behaviour of function osg::Image-getPixelSizeInBits() is strange.

2008-08-04 Thread Robert Osfield
Hi ?? Could you please sign with the name you would like to be
addressed with as it's tedious having to guess.

On Mon, Aug 4, 2008 at 12:09 PM, GMD GammerMaxyandex.ru
[EMAIL PROTECTED] wrote:
 ok.

Thanks. To check this out, I've added to src/osgDB/ReadFile.cpp's
osgDB::readImageFile() function the line:

notify(NOTICE)Image filename
getPixelSizeInBits()=rr.getImage()-getPixelSizeInBits()std::endl;

Image doska.jpg getPixelSizeInBits()=24

Doing a gdalinfo shows that this file is a RGB, single byte per
channel.  This suggests that the loading is correct.

Now, you mention something about a texture copy, but I can't work out
how this relates to the problem, your original email sounds like that
the copy produced the correct results, while the incorrect results
happened before.

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


Re: [osg-users] Plans for OpenSceneGraph-2.6.0-rc2

2008-08-04 Thread Adrian Egli OpenSceneGraph (3D)
sorry: windows xp with ATI (VC2003) and vista with NVidia (VC2005)
one problem is only the graphics context one, i wrote another email (answer:
Serge Problem)

2008/8/4 Robert Osfield [EMAIL PROTECTED]

 On Mon, Aug 4, 2008 at 11:05 AM, Adrian Egli OpenSceneGraph (3D)
 [EMAIL PROTECTED] wrote:
  OpenSceneGraph 2.6 works fine..

 Thanks for the testing... but what platform configuration?? :-)
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 

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


Re: [osg-users] How can I get know suuports video-card shaders or not?

2008-08-04 Thread Gordon Tomlinson
GOOGLE with get this 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of GMD
GammerMaxyandex.ru
Sent: Monday, August 04, 2008 6:58 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] How can I get know suuports video-card shaders or not?

How can I get know suuports video-card shaders or not?
___
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] Behaviour of function osg::Image-getPixelSizeInBits() is strange.

2008-08-04 Thread GMD GammerMaxyandex.ru
Thanks. I change Nvidia drivers (174  175), function getPixelSizeInBits return 
24 )))

04.08.08, 15:26, Robert Osfield [EMAIL PROTECTED]:

 Hi ?? Could you please sign with the name you would like to be
 addressed with as it's tedious having to guess.
 On Mon, Aug 4, 2008 at 12:09 PM, GMD GammerMaxyandex.ru
 [EMAIL PROTECTED] wrote:
  ok.
 Thanks. To check this out, I've added to src/osgDB/ReadFile.cpp's
 osgDB::readImageFile() function the line:
 notify(NOTICE)Image filename
 getPixelSizeInBits()=rr.getImage()-getPixelSizeInBits()std::endl;
 Image doska.jpg getPixelSizeInBits()=24
 Doing a gdalinfo shows that this file is a RGB, single byte per
 channel.  This suggests that the loading is correct.
 Now, you mention something about a texture copy, but I can't work out
 how this relates to the problem, your original email sounds like that
 the copy produced the correct results, while the incorrect results
 happened before.
 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] Win32 problem with CompileContexts

2008-08-04 Thread Glenn Waldron
FWIW I have never been able to get compile contexts to work on Windows since
the feature was introduced. So I believe the issue goes back a ways (i.e.,
is not particular to 2.6).

HTH- Glenn

On Mon, Aug 4, 2008 at 6:17 AM, Adrian Egli OpenSceneGraph (3D) 
[EMAIL PROTECTED] wrote:

 Hi Robert,

 i just come tested under windows vista, same as problem as Serge reported
 :-(

 PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: The
 requested resource is in use.


 2008/8/4 Robert Osfield [EMAIL PROTECTED]

 Hi Serge,

 I've been doing testing the compile context support using osgviewer on
 paged database I have and it all works without error so far.  I'm
 using Kubuntu 7.10 and 7800GT.  I enable compile contexts via:

  export OSG_COMPILE_CONTEXTS=ON
  osgviewer pagedmodel.ive --SingleThreaded

 I tried the whole range of threading models without incident.

 So this problem looks to be a Windows issue.  My guess is that the
 error report of about a problem with make current is what is the early
 warning of something not working quite right.  I'm afraid I can't do
 much to investigate this myself though as I have no Windows box to
 test against.

 Robert.


 On Thu, Jul 31, 2008 at 9:44 AM, Serge Lages [EMAIL PROTECTED]
 wrote:
  Hi all,
 
  I am currently trying to use CompileContexts on my application, but just
  doing this :
 
  osgViewer::Viewerviewer;
 
  viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
  osg::DisplaySettings::instance()-setCompileContextsHint(true);
  return (viewer.run());
 
  The application crash into glExtensions.cpp line 46 (trying to get the
 GL
  version with glGetString( GL_VERSION )).
  Before the crash I have this error message :
 
  PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: La
  ressource demandé est en cours d'utilisation.
  or in english something like that :
  PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: the
  wanted resource is already being used.
 
  Any idea on what's happening ?
  My system : WinXP with SVN head, VS 8 Express, NVIDIA 8600GTS
 
  Thanks in advance !
 
  --
  Serge Lages
  http://www.tharsis-software.com
 
  ___
  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




 --
 
 Adrian Egli

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




-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
+1.703.652.4791
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PAT and getWorldMatrices difference

2008-08-04 Thread Gordon Tomlinson

You also need to show how you are extracting the rotational values and how
your setting them 

To add to the issue there are many ways to set Quats up and retrieve the
rotational values out of them which can return different results

And again as Robert pointed out getting a transforms matrix and getting its
WolrdMatrices are not the same thing


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Melis
Sent: Monday, August 04, 2008 6:44 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] PAT and getWorldMatrices difference

Hi Vincent,

Vincent Bourdier wrote:
 My question is : why there is difference in the rotation when I get it 
 from a PAT (attached under the root) or when I do a getWolrdMatrices 
 on the same PAT

 Translation seems to be the same, but not rotation.
You ask a question which can't really be answered in general. You need to
show exactly what values you're getting and what you are expecting. 
Even better would be a very simple test program (or scene in .osg
format) that demonstrates the problem.

Paul
___
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] How can I get know suuports video-card shaders ornot?

2008-08-04 Thread Gordon Tomlinson
That should have been

A GOOGLE will get this for you 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gordon
Tomlinson
Sent: Monday, August 04, 2008 7:56 AM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] How can I get know suuports video-card shaders
ornot?

GOOGLE with get this 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of GMD
GammerMaxyandex.ru
Sent: Monday, August 04, 2008 6:58 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] How can I get know suuports video-card shaders or not?

How can I get know suuports video-card shaders or not?
___
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] Win32 problem with CompileContexts

2008-08-04 Thread Serge Lages
Some time ago it worked for me (the same time when we were able to make
glGetString calls outside a draw callbacks).

I'll try to make some tests this afternoon and let you know how it goes.

On Mon, Aug 4, 2008 at 1:56 PM, Glenn Waldron [EMAIL PROTECTED] wrote:

 FWIW I have never been able to get compile contexts to work on Windows
 since the feature was introduced. So I believe the issue goes back a ways
 (i.e., is not particular to 2.6).

 HTH- Glenn


 On Mon, Aug 4, 2008 at 6:17 AM, Adrian Egli OpenSceneGraph (3D) 
 [EMAIL PROTECTED] wrote:

 Hi Robert,

 i just come tested under windows vista, same as problem as Serge reported
 :-(

 PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: The
 requested resource is in use.


 2008/8/4 Robert Osfield [EMAIL PROTECTED]

 Hi Serge,

 I've been doing testing the compile context support using osgviewer on
 paged database I have and it all works without error so far.  I'm
 using Kubuntu 7.10 and 7800GT.  I enable compile contexts via:

  export OSG_COMPILE_CONTEXTS=ON
  osgviewer pagedmodel.ive --SingleThreaded

 I tried the whole range of threading models without incident.

 So this problem looks to be a Windows issue.  My guess is that the
 error report of about a problem with make current is what is the early
 warning of something not working quite right.  I'm afraid I can't do
 much to investigate this myself though as I have no Windows box to
 test against.

 Robert.


 On Thu, Jul 31, 2008 at 9:44 AM, Serge Lages [EMAIL PROTECTED]
 wrote:
  Hi all,
 
  I am currently trying to use CompileContexts on my application, but
 just
  doing this :
 
  osgViewer::Viewerviewer;
 
  viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
  osg::DisplaySettings::instance()-setCompileContextsHint(true);
  return (viewer.run());
 
  The application crash into glExtensions.cpp line 46 (trying to get the
 GL
  version with glGetString( GL_VERSION )).
  Before the crash I have this error message :
 
  PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: La
  ressource demandé est en cours d'utilisation.
  or in english something like that :
  PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: the
  wanted resource is already being used.
 
  Any idea on what's happening ?
  My system : WinXP with SVN head, VS 8 Express, NVIDIA 8600GTS
 
  Thanks in advance !
 
  --
  Serge Lages
  http://www.tharsis-software.com
 
  ___
  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




 --
 
 Adrian Egli

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




 --
 Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
 +1.703.652.4791

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




-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Removing colors and lighing from model?

2008-08-04 Thread Robert Osfield
Hi Sam,

On Mon, Aug 4, 2008 at 10:56 AM, Sam [EMAIL PROTECTED] wrote:
 I hope there will be a name now, otherwise call me Sam :)

Yep, name came through thanks.  Named posts help keep an informal and
friendly atmosphere on the list ;-)

 The funny thing is that disabling light worked before on other models, while
 assigning emission color, the objects have color, no matter if lighting is
 on or off (actually it is not full white, but I am on it)

The OpenGL material/lighting behaviour can be a bit perplexing, I'd
recommend reading well up on OpenGL materials and lighting.

 The other problem was solved by using the StatsVisitor (which I wanted to
 avoid). Traversing nodes clearing states and setting color arrays to 0
 helped.

If you disable he glColorMaterial contribution off then the vertex
colour arrays won't have any effect, in the OSG you can do this via:

   material-setColorMode(osg::Material::OFF);

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


Re: [osg-users] Behaviour of function osg::Image-getPixelSizeInBits() is strange.

2008-08-04 Thread Robert Osfield
Sender: [EMAIL PROTECTED]
On-Behalf-Of: [EMAIL PROTECTED]
Subject: Re: [osg-users] Behaviour of function  
osg::Image-getPixelSizeInBits() is strange.
Message-Id: [EMAIL PROTECTED]
Recipient: [EMAIL PROTECTED]
---BeginMessage---
Hi Max,

Could you provide the image file that revelled this issue.  Without
this I have absolutely no chance in tracking it down.

Robert.

On Wed, Jul 30, 2008 at 2:09 PM, GMD GammerMaxyandex.ru
[EMAIL PROTECTED] wrote:
 Behaviour of function osg::Image-getPixelSizeInBits() is strange. After 
 loadind OSG-file, I tryed get
 count bits by pixel (several different images was examinated)? and function 
 returns 64! After
 changing image of texture by its copy:
osg::Image* dest =dynamic_castosg::Image* 
 (MyImage-clone(osg::CopyOp::DEEP_COPY_ALL));
MyTexture-setImage(dest);

 function osg::Image-getPixelSizeInBits() returns correct values 24/32.
 Is any ideas?

 System: OSG 2.6.0 rc1, WinXp / Vista, VS 2008
 ___
 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
---End Message---
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] GL_MAX_SAMPLES_EXT was not declared compile bug in OSG 2.6 release branch

2008-08-04 Thread Robert Osfield
Thanks Philip, fix looks reasonable and is now merged and commited to
svn trunk and the OpenSceneGraph-2.6 branch

On Mon, Aug 4, 2008 at 1:43 PM, Philip Lowman [EMAIL PROTECTED] wrote:
 On Sun, Aug 3, 2008 at 9:38 AM, Robert Osfield [EMAIL PROTECTED]
 wrote:

 Hi Philip,

 The OSG deliberately avoids including glext.h, as this header file
 doesn't exist on most machines, and machines that it does is subject
 to flux.

 The GL_MAX_SAMPLES_EXT #define in question is provided by the
 include/osg/FrameBufferObject header, the relevent code in this header
 is:

 #ifndef GL_EXT_framebuffer_multisample
 #define GL_EXT_framebuffer_multisample 1
 #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT   0x8D56
 #define GL_MAX_SAMPLES_EXT  0x8D57
 #endif

 Which suggests that your own gl.h headers are defining
 GL_EXT_framebuffer_multisample but not GL_MAX_SAMPLES_EXT.  Could you
 please post your gl.h and glext.h so that we might review them and
 work out why the combination of define's is not working.

 Robert,

 Yes, you are correct.  The problem is in Centos 5's glext.h which is missing
 GL_MAX_SAMPLES_EXT in it's GL_EXT_framebuffer_multisample ifndef block.

 snip
 #ifndef GL_EXT_framebuffer_multisample
 #define GL_RENDERBUFFER_SAMPLES_EXT   0x8CAB
 #endif
 snip

 Attached is a patch to include/osg/FrameBufferObject that fixes the
 compilation and the gl/glext.h headers on my system.

 --
 Philip Lowman

 ___
 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] Qt + non-continuous draw + pagedLOD: Random loss of detail??

2008-08-04 Thread Robert Osfield
Thanks for the additions Maciej,  the changes have missed the
OpenSceneGraph-2.6 branch/feature freeze so will have to be merged
once 2.6 is out.

On Mon, Aug 4, 2008 at 1:51 PM, Maciej Krol [EMAIL PROTECTED] wrote:
 Hi all,

 I have implement frame based expiration of PagedLOD children. I will send it
 to osg-submissions as well.

 New attribute DatabasePager::_expiryFrames sets number of frames a PagedLOD
 child is kept in memory. The attribute is set with
 DatabasePager::setExpiryFrames method or OSG_EXPIRY_FRAMES environmental
 variable.

 New attribute PagedLOD::PerRangeData::_frameNumber contains frame number of
 last cull traversal.

 Children of PagedLOD are expired when time _AND_ number of frames since last
 cull traversal exceed OSG_EXPIRY_DELAY _AND_ OSG_EXPIRY_FRAMES respectively.
 By default OSG_EXPIRY_FRAMES = 1 which means that nodes from last
 cull/rendering
 traversal will not be expired even if last cull time exceeds
 OSG_EXPIRY_DELAY. Setting OSG_EXPIRY_FRAMES = 0 revokes previous behaviour
 of PagedLOD.

 Setting OSG_EXPIRY_FRAMES  0 fixes problems of children reloading in lazy
 rendering applications. Required behaviour is achieved by manipulating
 OSG_EXPIRY_DELAY and OSG_EXPIRY_FRAMES together.

 Two interface changes are made:

 DatabasePager::updateSceneGraph(double currentFrameTime) is replaced by
 DatabasePager::updateSceneGraph(const osg::FrameStamp frameStamp). The
 previous method is in #if 0 clause in the header file. Robert, decide if You
 want to include it.

 PagedLOD::removeExpiredChildren(double expiryTime, NodeList
 removedChildren) is deprecated (warning is printed), when subclassing use
 PagedLOD::removeExpiredChildren(double expiryTime, int expiryFrame, NodeList
 removedChildren) instead.

 Regards,
  Maciej Krol


 2008/8/3 Robert Osfield [EMAIL PROTECTED]

 Hi John,

 As others have pointed out, what you are seeing is the removal of
 expired subgraphs.  The DatabasePager is built around continuous
 update of the scene graph - both for loading of new subgraphs,
 compiling of subgraphs, merging of subgraphs and removal of expired
 subgraphs.   As such paging databases aren't appropriate to non
 continuous updated apps, you could fudge things by upping the expiry
 delay on the DatabasePager.  Doing periodic renders of the scene would
 also allow things to tick along.

 Robert.

 On Wed, Jul 30, 2008 at 1:39 PM, John Vidar Larring
 [EMAIL PROTECTED] wrote:
  Hi all,
 
  Background:
  ---
  In our application the user can set up scenes ( or sequences as we call
  them) for playback on a timeline (e.g. seq.1 - transition - seg.2 -
  transition ... seq.N). Some scenes are too complex to render real-time
  and
  are recorded to movies before playback. Hence, when scenes are edited by
  the
  user all scenes are redrawn as needed rather than continuously to avoid
  sluggish GUI response.
 
  Problem:
  
  _Sometimes_ when the scene is redrawn in edit mode (i.e. redraw only if
  needed), the pagedLOD DB (osgTerrain) drops to the lowest detail level
  (Ref.
  osg_original.jpg and osg_problem.jpg). This behavior seems to appear at
  randomly. In playback mode (i.e. when frame rate is constant) the
  problem
  never occurs.
 
  Reproduce / Code example:
  --
  The problem has been reproduces in a small test program
  (osgtest_source_code.tgz) derived from the osgviewerQT example (since we
  are
  using Qt 4.x in our application). To reproduce: run the compiled
  application: 'osgtest -t your osgTerrain db' . To trigger refreshes,
  occlude parts of the window with another window. The problem typically
  reveals itself when at a redraw or when the window looses focus (be
  patient,
  since this happens randomly it may take some time before the problem
  occurs).
 
  Since I'm still quite new to OSG, I'm not sure where to look for a
  solution.
  Hopefully someone will spot the obvious error in the sample code. Any
  advice
  is highly appreciated.
 
  Versions:
  -
  OSG svn rev 8700
  Qt 4.2.3
 
  Best regards,
  John Larring
 
  --
  This message has been scanned for viruses and
  dangerous content by MailScanner, and is
  believed to be clean.
 
 
  ___
  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



 --
 Regards,
 Maciej Krol

 ___
 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] Matrix Manipulators and set coordinate frame callback. Different behavior in 2.4?

2008-08-04 Thread Dorosky, Christopher G
Robert,

Thanks for the reply.

I goofed. When using Producer, whatever the default GA is,for #1, it
doesn't seem to call the callback.
Using #2 - #4 are fine. By #'s I mean pressing keyboard key 1-4 to
change the manipulator.

So now I am using #4. 

Chris 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Sunday, August 03, 2008 7:09 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Matrix Manipulators and set coordinate frame
callback. Different behavior in 2.4?

Hi Chris,

I'm not entirely clear on what bit isn't working, is it that you are
using osgProducer::Viewer from osgProducer SVN  with
OpenSceneGraph-2.4 and this is behaving differently from osgProducer and
OpenSceneGaph-1.2?

Robert.

On Mon, Jul 28, 2008 at 4:19 PM, Dorosky, Christopher G
[EMAIL PROTECTED] wrote:

 Hello all,

 Under OSG 1.2, I controlled the orientation of an osgGA manipulator 
 through the use of a coordinate frame callback.

 Under 2.4, I am using the same exact code, but the callback never 
 happens.

 Here is the code snippet. Viewer is osgProducer (yes, still).
 This loop runs 4 times.

 Viewer-getKeySwitchMatrixManipulator()-setHomePosition(eyeECEF,
 centerECEF, upECEF, false);
cECEFFrameCB *cb = new cECEFFrameCB;

 for(unsigned int i = 0; i
 Viewer-getKeySwitchMatrixManipulator()-getNumMatrixManipulators();
 i++)
{
osgGA::MatrixManipulator *mm =
 Viewer-getKeySwitchMatrixManipulator()-getMatrixManipulatorWithIndex
 Viewer-(i
 );
if(mm)
{
mm-setCoordinateFrameCallback(cb);
mm-setHomePosition(eyeECEF, centerECEF, 
 upECEF, false);
}
}

 Where the ECEFFrameCB is derived from the 
 osgGA:MatrixManipulator::CoordinateFrameCallback.

 I put a print in there, and it is never called.
 Has this functionality been disabled?

 What I am trying to do is set the up, side, and front vectors so that 
 the manipulator behaves better.

 Thanks,

 Chris
 ___
 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.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Robert Osfield
Hi All,

I have now tagged the 2.6.0 release candidate 2, you can grab it from
the downloads page:

  http://www.openscenegraph.org/projects/osg/wiki/Downloads

Or more directly:

* Zip file containing source code : OpenSceneGraph-2.6.0-rc2.zip
* Subversion tag : svn co
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.6.0-rc2
OpenSceneGraph
* Subversion 2.6 series branch : svn co
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.6
OpenSceneGraph

I have put together an initial draft of the press release (please
review/comment/amend):

   http://www.openscenegraph.org/projects/osg/wiki/News/Press/OSG2.6

Please test on as many platforms as you can, as this is the last rc
I'm planning, and as long as things go smoothly will press ahead an
make the final 2.6.0 tomorrow. Then it'd be great if we can then get
the binaries built and uploaded for the various platforms for
Wednesday.

Thanks in advance for testing.
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Matrix Manipulators and set coordinate frame callback. Different behavior in 2.4?

2008-08-04 Thread Robert Osfield
Hi Chris,

Just to be clear, does everything work as expected now?

Robert.

On Mon, Aug 4, 2008 at 4:00 PM, Dorosky, Christopher G
[EMAIL PROTECTED] wrote:
 Robert,

 Thanks for the reply.

 I goofed. When using Producer, whatever the default GA is,for #1, it
 doesn't seem to call the callback.
 Using #2 - #4 are fine. By #'s I mean pressing keyboard key 1-4 to
 change the manipulator.

 So now I am using #4.

 Chris

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Robert
 Osfield
 Sent: Sunday, August 03, 2008 7:09 AM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Matrix Manipulators and set coordinate frame
 callback. Different behavior in 2.4?

 Hi Chris,

 I'm not entirely clear on what bit isn't working, is it that you are
 using osgProducer::Viewer from osgProducer SVN  with
 OpenSceneGraph-2.4 and this is behaving differently from osgProducer and
 OpenSceneGaph-1.2?

 Robert.

 On Mon, Jul 28, 2008 at 4:19 PM, Dorosky, Christopher G
 [EMAIL PROTECTED] wrote:

 Hello all,

 Under OSG 1.2, I controlled the orientation of an osgGA manipulator
 through the use of a coordinate frame callback.

 Under 2.4, I am using the same exact code, but the callback never
 happens.

 Here is the code snippet. Viewer is osgProducer (yes, still).
 This loop runs 4 times.

 Viewer-getKeySwitchMatrixManipulator()-setHomePosition(eyeECEF,
 centerECEF, upECEF, false);
cECEFFrameCB *cb = new cECEFFrameCB;

 for(unsigned int i = 0; i
 Viewer-getKeySwitchMatrixManipulator()-getNumMatrixManipulators();
 i++)
{
osgGA::MatrixManipulator *mm =
 Viewer-getKeySwitchMatrixManipulator()-getMatrixManipulatorWithIndex
 Viewer-(i
 );
if(mm)
{
mm-setCoordinateFrameCallback(cb);
mm-setHomePosition(eyeECEF, centerECEF,
 upECEF, false);
}
}

 Where the ECEFFrameCB is derived from the
 osgGA:MatrixManipulator::CoordinateFrameCallback.

 I put a print in there, and it is never called.
 Has this functionality been disabled?

 What I am trying to do is set the up, side, and front vectors so that
 the manipulator behaves better.

 Thanks,

 Chris
 ___
 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.or
 g
 ___
 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] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Jean-Sébastien Guay

Hi Robert,


I have now tagged the 2.6.0 release candidate 2, you can grab it from
the downloads page:


I compiled right before you tagged, both on Windows Vista + VC2005 and 
on Ubuntu 8.04 on VirtualBox. All fine.


I noticed though that Daniel Olivier is not in the AUTHORS.txt file, I 
specifically credited him for a fix to GraphicsWindowWin32.cpp (see svn 
log for revision 8706 on that file)... Any chance he can be added? It's 
only fair...


Thanks,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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


Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Jean-Sébastien Guay

Hi Robert,


I have put together an initial draft of the press release (please
review/comment/amend):

   http://www.openscenegraph.org/projects/osg/wiki/News/Press/OSG2.6



Forgot to mention, press release looks good.

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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


Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Martin Spott
Robert Osfield wrote:

 I have now tagged the 2.6.0 release candidate 2, you can grab it from
 the downloads page:

SVN from 10:30 UTC today compiles properly and runs (tested only with
'osgviewer' and an AC3D model) on IRIX/N32 (MIPSPro) and
Solaris/SPARC32 (SunStudio),

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Win32 problem with CompileContexts

2008-08-04 Thread Serge Lages
Hi all,

I've made some investigations. First of all, I've tested several OSG
versions with the following code :

osgViewer::Viewer   viewer;

viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
osg::DisplaySettings::instance()-setCompileContextsHint(true);
osg::DisplaySettings::instance()-setMaxNumberOfGraphicsContexts(1);
viewer.setUpViewInWindow(100, 100, 800, 600);
viewer.setCameraManipulator(new osgGA::TrackballManipulator());
viewer.realize();
if (osg::GraphicsContext::getCompileContext(0) != NULL)
{
osg::Image*image = osgDB::readImageFile(test.jpg);
osg::StateSet*stateset = new osg::StateSet();
osg::Texture2D  *texture = new osg::Texture2D();

texture-setImage(image);
texture-setUnRefImageDataAfterApply(true);

texture-setInternalFormatMode(osg::Texture::USE_S3TC_DXT5_COMPRESSION);
stateset-setTextureAttributeAndModes(0, texture,
osg::StateAttribute::ON);

osg::GraphicsContext::getCompileContext(0)-makeCurrent();

stateset-compileGLObjects(*osg::GraphicsContext::getCompileContext(0)-getState());
osg::GraphicsContext::getCompileContext(0)-releaseContext();
if (texture-getImage() == NULL)
{
osg::notify(osg::NOTICE)  Texture successfully applied ! 
std::endl;
}
viewer.setSceneData(createTexturedQuad(0, 0, 100, 100, stateset));
}
viewer.run();

(the createTexturedQuad function just returns a geode with a quad and the
texture applied on it).

Here are my results :

- OSG 2.2 and OSG 2.4 : it seems to work, I have the Texture successfully
applied ! message and my quad have the texture on it. Note : if I don't
specify the setMaxNumberOfGraphicsContexts, my image is not unref but it
still works.

- Latest SVN : If setMaxNumberOfGraphicsContexts is not set to 1, it crash.
If it's set, I got the Texture successfully applied ! message but my quad
has no texture applied on it.

Robert, have you any hint on where to look next ? You told it works on
Linux, so do you think it will be usefull to start looking at the
modifications on the Win32 implementation of osgViewer since OSG 2.4 ?

On Mon, Aug 4, 2008 at 2:14 PM, Serge Lages [EMAIL PROTECTED] wrote:

 Some time ago it worked for me (the same time when we were able to make
 glGetString calls outside a draw callbacks).

 I'll try to make some tests this afternoon and let you know how it goes.


 On Mon, Aug 4, 2008 at 1:56 PM, Glenn Waldron [EMAIL PROTECTED] wrote:

 FWIW I have never been able to get compile contexts to work on Windows
 since the feature was introduced. So I believe the issue goes back a ways
 (i.e., is not particular to 2.6).

 HTH- Glenn


 On Mon, Aug 4, 2008 at 6:17 AM, Adrian Egli OpenSceneGraph (3D) 
 [EMAIL PROTECTED] wrote:

 Hi Robert,

 i just come tested under windows vista, same as problem as Serge reported
 :-(

 PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: The
 requested resource is in use.


 2008/8/4 Robert Osfield [EMAIL PROTECTED]

 Hi Serge,

 I've been doing testing the compile context support using osgviewer on
 paged database I have and it all works without error so far.  I'm
 using Kubuntu 7.10 and 7800GT.  I enable compile contexts via:

  export OSG_COMPILE_CONTEXTS=ON
  osgviewer pagedmodel.ive --SingleThreaded

 I tried the whole range of threading models without incident.

 So this problem looks to be a Windows issue.  My guess is that the
 error report of about a problem with make current is what is the early
 warning of something not working quite right.  I'm afraid I can't do
 much to investigate this myself though as I have no Windows box to
 test against.

 Robert.


 On Thu, Jul 31, 2008 at 9:44 AM, Serge Lages [EMAIL PROTECTED]
 wrote:
  Hi all,
 
  I am currently trying to use CompileContexts on my application, but
 just
  doing this :
 
  osgViewer::Viewerviewer;
 
  viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
  osg::DisplaySettings::instance()-setCompileContextsHint(true);
  return (viewer.run());
 
  The application crash into glExtensions.cpp line 46 (trying to get the
 GL
  version with glGetString( GL_VERSION )).
  Before the crash I have this error message :
 
  PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: La
  ressource demandé est en cours d'utilisation.
  or in english something like that :
  PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: the
  wanted resource is already being used.
 
  Any idea on what's happening ?
  My system : WinXP with SVN head, VS 8 Express, NVIDIA 8600GTS
 
  Thanks in advance !
 
  --
  Serge Lages
  http://www.tharsis-software.com
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 ___
 osg-users mailing list
 

Re: [osg-users] Win32 problem with CompileContexts

2008-08-04 Thread Serge Lages
Currently it doesn't work with OSG 2.4 as I said (the behavior is strange
with this version, in some case it works, in other not). But with 2.2 it
still works in all case.

On Mon, Aug 4, 2008 at 5:31 PM, Serge Lages [EMAIL PROTECTED] wrote:

 Hi all,

 I've made some investigations. First of all, I've tested several OSG
 versions with the following code :

 osgViewer::Viewer   viewer;

 viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
 osg::DisplaySettings::instance()-setCompileContextsHint(true);
 osg::DisplaySettings::instance()-setMaxNumberOfGraphicsContexts(1);
 viewer.setUpViewInWindow(100, 100, 800, 600);
 viewer.setCameraManipulator(new osgGA::TrackballManipulator());
 viewer.realize();
 if (osg::GraphicsContext::getCompileContext(0) != NULL)
 {
 osg::Image*image = osgDB::readImageFile(test.jpg);
 osg::StateSet*stateset = new osg::StateSet();
 osg::Texture2D  *texture = new osg::Texture2D();

 texture-setImage(image);
 texture-setUnRefImageDataAfterApply(true);

 texture-setInternalFormatMode(osg::Texture::USE_S3TC_DXT5_COMPRESSION);
 stateset-setTextureAttributeAndModes(0, texture,
 osg::StateAttribute::ON);

 osg::GraphicsContext::getCompileContext(0)-makeCurrent();

 stateset-compileGLObjects(*osg::GraphicsContext::getCompileContext(0)-getState());
 osg::GraphicsContext::getCompileContext(0)-releaseContext();
 if (texture-getImage() == NULL)
 {
 osg::notify(osg::NOTICE)  Texture successfully applied ! 
 std::endl;
 }
 viewer.setSceneData(createTexturedQuad(0, 0, 100, 100, stateset));
 }
 viewer.run();

 (the createTexturedQuad function just returns a geode with a quad and the
 texture applied on it).

 Here are my results :

 - OSG 2.2 and OSG 2.4 : it seems to work, I have the Texture successfully
 applied ! message and my quad have the texture on it. Note : if I don't
 specify the setMaxNumberOfGraphicsContexts, my image is not unref but it
 still works.

 - Latest SVN : If setMaxNumberOfGraphicsContexts is not set to 1, it crash.
 If it's set, I got the Texture successfully applied ! message but my quad
 has no texture applied on it.

 Robert, have you any hint on where to look next ? You told it works on
 Linux, so do you think it will be usefull to start looking at the
 modifications on the Win32 implementation of osgViewer since OSG 2.4 ?


 On Mon, Aug 4, 2008 at 2:14 PM, Serge Lages [EMAIL PROTECTED] wrote:

 Some time ago it worked for me (the same time when we were able to make
 glGetString calls outside a draw callbacks).

 I'll try to make some tests this afternoon and let you know how it goes.


 On Mon, Aug 4, 2008 at 1:56 PM, Glenn Waldron [EMAIL PROTECTED] wrote:

 FWIW I have never been able to get compile contexts to work on Windows
 since the feature was introduced. So I believe the issue goes back a ways
 (i.e., is not particular to 2.6).

 HTH- Glenn


 On Mon, Aug 4, 2008 at 6:17 AM, Adrian Egli OpenSceneGraph (3D) 
 [EMAIL PROTECTED] wrote:

 Hi Robert,

 i just come tested under windows vista, same as problem as Serge
 reported :-(

 PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: The
 requested resource is in use.


 2008/8/4 Robert Osfield [EMAIL PROTECTED]

 Hi Serge,

 I've been doing testing the compile context support using osgviewer on
 paged database I have and it all works without error so far.  I'm
 using Kubuntu 7.10 and 7800GT.  I enable compile contexts via:

  export OSG_COMPILE_CONTEXTS=ON
  osgviewer pagedmodel.ive --SingleThreaded

 I tried the whole range of threading models without incident.

 So this problem looks to be a Windows issue.  My guess is that the
 error report of about a problem with make current is what is the early
 warning of something not working quite right.  I'm afraid I can't do
 much to investigate this myself though as I have no Windows box to
 test against.

 Robert.


 On Thu, Jul 31, 2008 at 9:44 AM, Serge Lages [EMAIL PROTECTED]
 wrote:
  Hi all,
 
  I am currently trying to use CompileContexts on my application, but
 just
  doing this :
 
  osgViewer::Viewerviewer;
 
  viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
  osg::DisplaySettings::instance()-setCompileContextsHint(true);
  return (viewer.run());
 
  The application crash into glExtensions.cpp line 46 (trying to get
 the GL
  version with glGetString( GL_VERSION )).
  Before the crash I have this error message :
 
  PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: La
  ressource demandé est en cours d'utilisation.
  or in english something like that :
  PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error:
 the
  wanted resource is already being used.
 
  Any idea on what's happening ?
  My system : WinXP with SVN head, VS 8 Express, NVIDIA 8600GTS
 
  Thanks in advance !
 
  --
  Serge Lages
  

Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Robert Osfield
On Mon, Aug 4, 2008 at 4:09 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
 I compiled right before you tagged, both on Windows Vista + VC2005 and on
 Ubuntu 8.04 on VirtualBox. All fine.

Thanks for the testing.

 I noticed though that Daniel Olivier is not in the AUTHORS.txt file, I
 specifically credited him for a fix to GraphicsWindowWin32.cpp (see svn log
 for revision 8706 on that file)... Any chance he can be added? It's only
 fair...

The AUTHORS file is automotically generated, in this instance from svn
trunk, if this differs then it'll because the svn merge isn't pulling
in the commit messages from the branch or perhaps just because the
credit isn't done in a way that osgversion picks up.

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


[osg-users] Viewer/CompositeViewer

2008-08-04 Thread DanG2015
I'm starting to convert several apps from OSG 1.X to the current  release.  
I've read the posts regarding Viewer and CompositeViewer and want  to make sure 
I'm understanding it right.  If you don't mind a few beginner  questions...
 
1)  Viewer (which is a View) can have one or more Cameras, but if  using 
multiple Cameras, they are positionally slaved to the single View Camera  by 
offset matrices, right?
 
2)  The slaved Cameras can share the subgraph (Scene) below the  View Camera, 
but if desired, they could have their own subgraphs?
 
3)  It seems that generally, since the slaves are offset from the View  
master camera, for most applications, they would share the same Scene,  right?
 
4)  CompositeViewer (which contains Views) can be more flexible  since each 
View Camera can be independently positioned (i.e., different views of  the 
same Scene, but where Camera 2 doesn't necessarily follow Camera 1).
 
5)  The View(s) within a CompositeViewer could themselves be  single-Camera 
or master-slave configurations.
 
6) It seems that a CompositeViewer with a few Views could be functionally  
equivalent to a Viewer with slave Cameras provided the user positions the  
CompositeViewer Views with respect to a designated master View in  real-time?
 
7)  I see some efficiencies, such as a master-slave View applying  the Update 
traversal only once to the shared Scene.  Are there any other  significant 
benefits (e.g., cull, rendering, state) that make a Viewer  master-slave setup 
more efficient than the equivalent manually-slaved Views in a  CompositeViewer?
 
Sorry for the length, but I hope this post might be useful to others just  
starting the 1.X to 2.X conversion.
 
Thanks!
Dan Guinther
 



**Looking for a car that's sporty, fun and fits in your budget? 
Read reviews on AOL Autos.  
(http://autos.aol.com/cars-BMW-128-2008/expert-review?ncid=aolaut000517 
)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Win32 problem with CompileContexts

2008-08-04 Thread Robert Osfield
Hi Serge,

The code looks to be a bit suspect to me.  The problem is that the
CompileContextHint will tell osgViewer to try and create a compile
context for each window it creates, and then start a thread for each
of these compile context, this thread will have the a makeCurrent()
internally and then assume that this thread has the context.
However, with your code you go ahead a do a
makeCurrent()/releaseContext() in the main thread so that the compile
contexts graphics thread will no longer have the context current and
any further OpenGL calls in that thread will fail.   The fact that
this ever worked is surprising...

If you do want to do a precompile in the way you are doing it'd be
best to manually create the compile context, use it, then start the
thread on it, or just then discard the context.

Robert.

On Mon, Aug 4, 2008 at 4:31 PM, Serge Lages [EMAIL PROTECTED] wrote:
 Hi all,

 I've made some investigations. First of all, I've tested several OSG
 versions with the following code :

 osgViewer::Viewer   viewer;

 viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
 osg::DisplaySettings::instance()-setCompileContextsHint(true);
 osg::DisplaySettings::instance()-setMaxNumberOfGraphicsContexts(1);
 viewer.setUpViewInWindow(100, 100, 800, 600);
 viewer.setCameraManipulator(new osgGA::TrackballManipulator());
 viewer.realize();
 if (osg::GraphicsContext::getCompileContext(0) != NULL)
 {
 osg::Image*image = osgDB::readImageFile(test.jpg);
 osg::StateSet*stateset = new osg::StateSet();
 osg::Texture2D  *texture = new osg::Texture2D();

 texture-setImage(image);
 texture-setUnRefImageDataAfterApply(true);

 texture-setInternalFormatMode(osg::Texture::USE_S3TC_DXT5_COMPRESSION);
 stateset-setTextureAttributeAndModes(0, texture,
 osg::StateAttribute::ON);

 osg::GraphicsContext::getCompileContext(0)-makeCurrent();

 stateset-compileGLObjects(*osg::GraphicsContext::getCompileContext(0)-getState());
 osg::GraphicsContext::getCompileContext(0)-releaseContext();
 if (texture-getImage() == NULL)
 {
 osg::notify(osg::NOTICE)  Texture successfully applied ! 
 std::endl;
 }
 viewer.setSceneData(createTexturedQuad(0, 0, 100, 100, stateset));
 }
 viewer.run();

 (the createTexturedQuad function just returns a geode with a quad and the
 texture applied on it).

 Here are my results :

 - OSG 2.2 and OSG 2.4 : it seems to work, I have the Texture successfully
 applied ! message and my quad have the texture on it. Note : if I don't
 specify the setMaxNumberOfGraphicsContexts, my image is not unref but it
 still works.

 - Latest SVN : If setMaxNumberOfGraphicsContexts is not set to 1, it crash.
 If it's set, I got the Texture successfully applied ! message but my quad
 has no texture applied on it.

 Robert, have you any hint on where to look next ? You told it works on
 Linux, so do you think it will be usefull to start looking at the
 modifications on the Win32 implementation of osgViewer since OSG 2.4 ?

 On Mon, Aug 4, 2008 at 2:14 PM, Serge Lages [EMAIL PROTECTED] wrote:

 Some time ago it worked for me (the same time when we were able to make
 glGetString calls outside a draw callbacks).

 I'll try to make some tests this afternoon and let you know how it goes.

 On Mon, Aug 4, 2008 at 1:56 PM, Glenn Waldron [EMAIL PROTECTED] wrote:

 FWIW I have never been able to get compile contexts to work on Windows
 since the feature was introduced. So I believe the issue goes back a ways
 (i.e., is not particular to 2.6).

 HTH- Glenn

 On Mon, Aug 4, 2008 at 6:17 AM, Adrian Egli OpenSceneGraph (3D)
 [EMAIL PROTECTED] wrote:

 Hi Robert,

 i just come tested under windows vista, same as problem as Serge
 reported :-(

 PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: The
 requested resource is in use.


 2008/8/4 Robert Osfield [EMAIL PROTECTED]

 Hi Serge,

 I've been doing testing the compile context support using osgviewer on
 paged database I have and it all works without error so far.  I'm
 using Kubuntu 7.10 and 7800GT.  I enable compile contexts via:

  export OSG_COMPILE_CONTEXTS=ON
  osgviewer pagedmodel.ive --SingleThreaded

 I tried the whole range of threading models without incident.

 So this problem looks to be a Windows issue.  My guess is that the
 error report of about a problem with make current is what is the early
 warning of something not working quite right.  I'm afraid I can't do
 much to investigate this myself though as I have no Windows box to
 test against.

 Robert.


 On Thu, Jul 31, 2008 at 9:44 AM, Serge Lages [EMAIL PROTECTED]
 wrote:
  Hi all,
 
  I am currently trying to use CompileContexts on my application, but
  just
  doing this :
 
  osgViewer::Viewerviewer;
 
  viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
  

Re: [osg-users] Viewer/CompositeViewer

2008-08-04 Thread Robert Osfield
Hi Dan,

You are mostly on the right track.

A couple of clarifications:

  A view has a single Master Camera accessed via view.getCamera()
  A view has an optional list of zero to many Slave Camera.
  A view's Master Camera can be active (have its own GraphicsContext)
or passive (no GraphicsContext).
  A Slave Camera can choose whether to use the same scene graph as the
master, or have its own local scene graph

  A CompositeViewer with multiple Views that share the same scene
graph (wrapped up by osgViewer::Scene) will only need
  to do a single update traversal per Scene.

  The is no performance advantage of using osgViewer::Viewer with
multiple slaves over osgViewer::CompositeViewer
  with multiple Views, internally all the rendering and threading is the same.

  CompositeViewer provides event handling/camera manipulators per
View, and the option of having separate scene
  graph, so makes it far more suitable for apps with multiple views.

  Slave Camera main usage is in doing multichannel displays or
distortion correction.

Robert.




On Mon, Aug 4, 2008 at 5:21 PM,  [EMAIL PROTECTED] wrote:
 I'm starting to convert several apps from OSG 1.X to the current release.
 I've read the posts regarding Viewer and CompositeViewer and want to make
 sure I'm understanding it right.  If you don't mind a few beginner
 questions...

 1)  Viewer (which is a View) can have one or more Cameras, but if using
 multiple Cameras, they are positionally slaved to the single View Camera by
 offset matrices, right?

 2)  The slaved Cameras can share the subgraph (Scene) below the View Camera,
 but if desired, they could have their own subgraphs?

 3)  It seems that generally, since the slaves are offset from the View
 master camera, for most applications, they would share the same Scene,
 right?

 4)  CompositeViewer (which contains Views) can be more flexible since each
 View Camera can be independently positioned (i.e., different views of the
 same Scene, but where Camera 2 doesn't necessarily follow Camera 1).

 5)  The View(s) within a CompositeViewer could themselves be single-Camera
 or master-slave configurations.

 6) It seems that a CompositeViewer with a few Views could be functionally
 equivalent to a Viewer with slave Cameras provided the user positions the
 CompositeViewer Views with respect to a designated master View in
 real-time?

 7)  I see some efficiencies, such as a master-slave View applying the Update
 traversal only once to the shared Scene.  Are there any other significant
 benefits (e.g., cull, rendering, state) that make a Viewer master-slave
 setup more efficient than the equivalent manually-slaved Views in a
 CompositeViewer?

 Sorry for the length, but I hope this post might be useful to others just
 starting the 1.X to 2.X conversion.

 Thanks!
 Dan Guinther



 
 Looking for a car that's sporty, fun and fits in your budget? Read reviews
 on AOL Autos.
 ___
 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] Viewer/CompositeViewer

2008-08-04 Thread Fuesz, Matthew
Slaves can be moved independently of the main camera by setting their
reference frames to ABSOLUTE_RF. Otherwise, yes, they are offset from
the main camera.

 

Yes, slaves can either share the main graph or may have their own
subgraphs.

 

Typically, yes, though this all depends on what they're being used for.
I have used a slave to provide an orthographic overlay (HUD) projection,
which has its own unique subgraph.

 

A single Viewer should be used when there is a single conceptual view,
while CompositeViewer should be used when there is more than one. See
the Viewer vs. Composite viewer programming guide on the OSG site for
more discussion on this (including usage examples).

 

Matthew W. Fuesz

Software Engineer Asc.

Lockheed Martin STS

1210 Massillon Road

Akron, OH 44315

[EMAIL PROTECTED]

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, August 04, 2008 12:21 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Viewer/CompositeViewer

 

I'm starting to convert several apps from OSG 1.X to the current
release.  I've read the posts regarding Viewer and CompositeViewer and
want to make sure I'm understanding it right.  If you don't mind a few
beginner questions...

 

1)  Viewer (which is a View) can have one or more Cameras, but if
using multiple Cameras, they are positionally slaved to the single View
Camera by offset matrices, right?

 

2)  The slaved Cameras can share the subgraph (Scene) below the View
Camera, but if desired, they could have their own subgraphs?

 

3)  It seems that generally, since the slaves are offset from the View
master camera, for most applications, they would share the same Scene,
right?

 

4)  CompositeViewer (which contains Views) can be more flexible since
each View Camera can be independently positioned (i.e., different views
of the same Scene, but where Camera 2 doesn't necessarily follow Camera
1).

 

5)  The View(s) within a CompositeViewer could themselves be
single-Camera or master-slave configurations.

 

6) It seems that a CompositeViewer with a few Views could be
functionally equivalent to a Viewer with slave Cameras provided the
user positions the CompositeViewer Views with respect to a designated
master View in real-time?

 

7)  I see some efficiencies, such as a master-slave View applying the
Update traversal only once to the shared Scene.  Are there any other
significant benefits (e.g., cull, rendering, state) that make a Viewer
master-slave setup more efficient than the equivalent manually-slaved
Views in a CompositeViewer?

 

Sorry for the length, but I hope this post might be useful to others
just starting the 1.X to 2.X conversion.

 

Thanks!

Dan Guinther

 







Looking for a car that's sporty, fun and fits in your budget? Read
reviews on AOL Autos
http://autos.aol.com/cars-BMW-128-2008/expert-review?ncid=aolaut0005000
017 .

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


Re: [osg-users] Viewer/CompositeViewer

2008-08-04 Thread Fuesz, Matthew
Whoops - forgot to include the numbers referencing the original email.
Added them below.

 

Matthew W. Fuesz

Software Engineer Asc.

Lockheed Martin STS

1210 Massillon Road

Akron, OH 44315

[EMAIL PROTECTED]

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Fuesz,
Matthew
Sent: Monday, August 04, 2008 12:31 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Viewer/CompositeViewer

 

1 - Slaves can be moved independently of the main camera by setting
their reference frames to ABSOLUTE_RF. Otherwise, yes, they are offset
from the main camera.

 

2 - Yes, slaves can either share the main graph or may have their own
subgraphs.

 

3 - Typically, yes, though this all depends on what they're being used
for. I have used a slave to provide an orthographic overlay (HUD)
projection, which has its own unique subgraph.

 

A single Viewer should be used when there is a single conceptual view,
while CompositeViewer should be used when there is more than one. See
the Viewer vs. Composite viewer programming guide on the OSG site for
more discussion on this (including usage examples).

 

Matthew W. Fuesz

Software Engineer Asc.

Lockheed Martin STS

1210 Massillon Road

Akron, OH 44315

[EMAIL PROTECTED]

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, August 04, 2008 12:21 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Viewer/CompositeViewer

 

I'm starting to convert several apps from OSG 1.X to the current
release.  I've read the posts regarding Viewer and CompositeViewer and
want to make sure I'm understanding it right.  If you don't mind a few
beginner questions...

 

1)  Viewer (which is a View) can have one or more Cameras, but if
using multiple Cameras, they are positionally slaved to the single View
Camera by offset matrices, right?

 

2)  The slaved Cameras can share the subgraph (Scene) below the View
Camera, but if desired, they could have their own subgraphs?

 

3)  It seems that generally, since the slaves are offset from the View
master camera, for most applications, they would share the same Scene,
right?

 

4)  CompositeViewer (which contains Views) can be more flexible since
each View Camera can be independently positioned (i.e., different views
of the same Scene, but where Camera 2 doesn't necessarily follow Camera
1).

 

5)  The View(s) within a CompositeViewer could themselves be
single-Camera or master-slave configurations.

 

6) It seems that a CompositeViewer with a few Views could be
functionally equivalent to a Viewer with slave Cameras provided the
user positions the CompositeViewer Views with respect to a designated
master View in real-time?

 

7)  I see some efficiencies, such as a master-slave View applying the
Update traversal only once to the shared Scene.  Are there any other
significant benefits (e.g., cull, rendering, state) that make a Viewer
master-slave setup more efficient than the equivalent manually-slaved
Views in a CompositeViewer?

 

Sorry for the length, but I hope this post might be useful to others
just starting the 1.X to 2.X conversion.

 

Thanks!

Dan Guinther

 

 



Looking for a car that's sporty, fun and fits in your budget? Read
reviews on AOL Autos
http://autos.aol.com/cars-BMW-128-2008/expert-review?ncid=aolaut0005000
017 .

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


Re: [osg-users] Removing colors and lighing from model?

2008-08-04 Thread GMD GammerMaxyandex.ru
LIGHTING ON:
xxx-getOrCreateStateSet()-setMode(GL_LIGHTING,osg::StateAttribute::ON | 
osg::StateAttribute::OVERRIDE);

LIGHTING OFF:
xxx-getOrCreateStateSet()-setMode(GL_LIGHTING,osg::StateAttribute::OFF | 
osg::StateAttribute::OVERRIDE);

04.08.08, 16:18, Robert Osfield [EMAIL PROTECTED]:

 Hi Sam,
 On Mon, Aug 4, 2008 at 10:56 AM, Sam [EMAIL PROTECTED] wrote:
  I hope there will be a name now, otherwise call me Sam :)
 Yep, name came through thanks.  Named posts help keep an informal and
 friendly atmosphere on the list ;-)
  The funny thing is that disabling light worked before on other models, while
  assigning emission color, the objects have color, no matter if lighting is
  on or off (actually it is not full white, but I am on it)
 The OpenGL material/lighting behaviour can be a bit perplexing, I'd
 recommend reading well up on OpenGL materials and lighting.
  The other problem was solved by using the StatsVisitor (which I wanted to
  avoid). Traversing nodes clearing states and setting color arrays to 0
  helped.
 If you disable he glColorMaterial contribution off then the vertex
 colour arrays won't have any effect, in the OSG you can do this via:
material-setColorMode(osg::Material::OFF);
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
Яндекс.Открытки. Дорого внимание http://cards.yandex.ru/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Win32 problem with CompileContexts

2008-08-04 Thread Serge Lages
You're right, my test wasn't correct.
I've made a new one (see below), and it doesn't work on any OSG version...
:/ It crash everywhere on glGetString because the makeCurrent failed on the
PixelBuffer.
I'll try to work on it tomorrow, any idea on where to look ? :) Are
PixelBuffer not working at all under Windows or just having troubles with
the CompileContext ?

Here is my new test :

class CustomOperation : public osg::Operation
{
public:

CustomOperation() : osg::Operation(CustomOperation, true) {}

void operator()(osg::Object *object)
{
osgViewer::Viewer*viewer = dynamic_castosgViewer::Viewer
*(object);

// Do my task
if (viewer == NULL  _node == NULL)
{
osg::Image*image = osgDB::readImageFile(test.jpg);
osg::StateSet*stateset = new osg::StateSet();
osg::Texture2D*texture = new osg::Texture2D();

texture-setImage(image);
texture-setUnRefImageDataAfterApply(true);

texture-setInternalFormatMode(osg::Texture::USE_S3TC_DXT5_COMPRESSION);
stateset-setTextureAttributeAndModes(0, texture,
osg::StateAttribute::ON);


stateset-compileGLObjects(*osg::GraphicsContext::getCompileContext(0)-getState());
if (texture-getImage() == NULL)
{
osg::notify(osg::NOTICE)  Image successfully applied !
 std::endl;
}
_node = createTexturedQuad(osg::Vec2(), 100, 100, stateset);
}
// Update the scene
else if (_node != NULL 
viewer-getSceneData()-asGroup()-getNumChildren() == 0)
{
osg::notify(osg::NOTICE)  Node merged to the graph ! 
std::endl;
viewer-getSceneData()-asGroup()-addChild(_node.get());
}
}

private:

osg::ref_ptrosg::Node_node;
};

int main(int ac, char **av)
{
osgViewer::Viewerviewer;

viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
osg::DisplaySettings::instance()-setCompileContextsHint(true);
osg::DisplaySettings::instance()-setMaxNumberOfGraphicsContexts(1);
viewer.setUpViewInWindow(100, 100, 800, 600);
viewer.setCameraManipulator(new osgGA::TrackballManipulator());
viewer.setSceneData(new osg::Group());
viewer.realize();

if (osg::GraphicsContext::getCompileContext(0) != NULL 
osg::GraphicsContext::getCompileContext(0)-getGraphicsThread() !=
NULL)
{
CustomOperation*operation = new CustomOperation();


osg::GraphicsContext::getCompileContext(0)-getGraphicsThread()-add(operation);
viewer.addUpdateOperation(operation);
osg::notify(osg::NOTICE)  Operation successfully added ! 
std::endl;
}

viewer.run();
}

On Mon, Aug 4, 2008 at 6:22 PM, Robert Osfield [EMAIL PROTECTED]wrote:

 Hi Serge,

 The code looks to be a bit suspect to me.  The problem is that the
 CompileContextHint will tell osgViewer to try and create a compile
 context for each window it creates, and then start a thread for each
 of these compile context, this thread will have the a makeCurrent()
 internally and then assume that this thread has the context.
 However, with your code you go ahead a do a
 makeCurrent()/releaseContext() in the main thread so that the compile
 contexts graphics thread will no longer have the context current and
 any further OpenGL calls in that thread will fail.   The fact that
 this ever worked is surprising...

 If you do want to do a precompile in the way you are doing it'd be
 best to manually create the compile context, use it, then start the
 thread on it, or just then discard the context.

 Robert.

 On Mon, Aug 4, 2008 at 4:31 PM, Serge Lages [EMAIL PROTECTED] wrote:
  Hi all,
 
  I've made some investigations. First of all, I've tested several OSG
  versions with the following code :
 
  osgViewer::Viewer   viewer;
 
  viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
  osg::DisplaySettings::instance()-setCompileContextsHint(true);
  osg::DisplaySettings::instance()-setMaxNumberOfGraphicsContexts(1);
  viewer.setUpViewInWindow(100, 100, 800, 600);
  viewer.setCameraManipulator(new osgGA::TrackballManipulator());
  viewer.realize();
  if (osg::GraphicsContext::getCompileContext(0) != NULL)
  {
  osg::Image*image = osgDB::readImageFile(test.jpg);
  osg::StateSet*stateset = new osg::StateSet();
  osg::Texture2D  *texture = new osg::Texture2D();
 
  texture-setImage(image);
  texture-setUnRefImageDataAfterApply(true);
 
  texture-setInternalFormatMode(osg::Texture::USE_S3TC_DXT5_COMPRESSION);
  stateset-setTextureAttributeAndModes(0, texture,
  osg::StateAttribute::ON);
 
  osg::GraphicsContext::getCompileContext(0)-makeCurrent();
 
 
 stateset-compileGLObjects(*osg::GraphicsContext::getCompileContext(0)-getState());
  osg::GraphicsContext::getCompileContext(0)-releaseContext();
  if 

Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Cedric Pinson
I will not have time to try it because of vacation, but often there are 
issue about packaging files (.pc ), so this is just a reminder to check 
it ;)

Cedric

Robert Osfield wrote:

On Mon, Aug 4, 2008 at 4:09 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
  

I compiled right before you tagged, both on Windows Vista + VC2005 and on
Ubuntu 8.04 on VirtualBox. All fine.



Thanks for the testing.

  

I noticed though that Daniel Olivier is not in the AUTHORS.txt file, I
specifically credited him for a fix to GraphicsWindowWin32.cpp (see svn log
for revision 8706 on that file)... Any chance he can be added? It's only
fair...



The AUTHORS file is automotically generated, in this instance from svn
trunk, if this differs then it'll because the svn merge isn't pulling
in the commit messages from the branch or perhaps just because the
credit isn't done in a way that osgversion picks up.

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


--
+33 (0) 6 63 20 03 56  Cedric Pinson mailto:[EMAIL PROTECTED] 
http://www.plopbyte.net


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


Re: [osg-users] Win32 problem with CompileContexts

2008-08-04 Thread Robert Osfield
Hi Serge,

I can't right out whether your new code is safe,  I would for starts
check the graphics context is being passed in by case the object to a
GraphicsContext* as well as the Viewer* just to make sure that it's be
called from the correct thread.

Rather than roll your own tests, could you just try enabling the
compile context via the setting the env var OSG_COMPILE_CONTEXTS to
ON, then running osgviewer on one your paged databases.

Robert.

On Mon, Aug 4, 2008 at 5:46 PM, Serge Lages [EMAIL PROTECTED] wrote:
 You're right, my test wasn't correct.
 I've made a new one (see below), and it doesn't work on any OSG version...
 :/ It crash everywhere on glGetString because the makeCurrent failed on the
 PixelBuffer.
 I'll try to work on it tomorrow, any idea on where to look ? :) Are
 PixelBuffer not working at all under Windows or just having troubles with
 the CompileContext ?

 Here is my new test :

 class CustomOperation : public osg::Operation
 {
 public:

 CustomOperation() : osg::Operation(CustomOperation, true) {}

 void operator()(osg::Object *object)
 {
 osgViewer::Viewer*viewer = dynamic_castosgViewer::Viewer
 *(object);

 // Do my task
 if (viewer == NULL  _node == NULL)
 {
 osg::Image*image = osgDB::readImageFile(test.jpg);
 osg::StateSet*stateset = new osg::StateSet();
 osg::Texture2D*texture = new osg::Texture2D();

 texture-setImage(image);
 texture-setUnRefImageDataAfterApply(true);

 texture-setInternalFormatMode(osg::Texture::USE_S3TC_DXT5_COMPRESSION);
 stateset-setTextureAttributeAndModes(0, texture,
 osg::StateAttribute::ON);


 stateset-compileGLObjects(*osg::GraphicsContext::getCompileContext(0)-getState());
 if (texture-getImage() == NULL)
 {
 osg::notify(osg::NOTICE)  Image successfully applied !
  std::endl;
 }
 _node = createTexturedQuad(osg::Vec2(), 100, 100, stateset);
 }
 // Update the scene
 else if (_node != NULL 
 viewer-getSceneData()-asGroup()-getNumChildren() == 0)
 {
 osg::notify(osg::NOTICE)  Node merged to the graph ! 
 std::endl;
 viewer-getSceneData()-asGroup()-addChild(_node.get());
 }
 }

 private:

 osg::ref_ptrosg::Node_node;
 };

 int main(int ac, char **av)
 {
 osgViewer::Viewerviewer;

 viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
 osg::DisplaySettings::instance()-setCompileContextsHint(true);
 osg::DisplaySettings::instance()-setMaxNumberOfGraphicsContexts(1);
 viewer.setUpViewInWindow(100, 100, 800, 600);
 viewer.setCameraManipulator(new osgGA::TrackballManipulator());
 viewer.setSceneData(new osg::Group());
 viewer.realize();

 if (osg::GraphicsContext::getCompileContext(0) != NULL 
 osg::GraphicsContext::getCompileContext(0)-getGraphicsThread() !=
 NULL)
 {
 CustomOperation*operation = new CustomOperation();


 osg::GraphicsContext::getCompileContext(0)-getGraphicsThread()-add(operation);
 viewer.addUpdateOperation(operation);
 osg::notify(osg::NOTICE)  Operation successfully added ! 
 std::endl;
 }

 viewer.run();
 }

 On Mon, Aug 4, 2008 at 6:22 PM, Robert Osfield [EMAIL PROTECTED]
 wrote:

 Hi Serge,

 The code looks to be a bit suspect to me.  The problem is that the
 CompileContextHint will tell osgViewer to try and create a compile
 context for each window it creates, and then start a thread for each
 of these compile context, this thread will have the a makeCurrent()
 internally and then assume that this thread has the context.
 However, with your code you go ahead a do a
 makeCurrent()/releaseContext() in the main thread so that the compile
 contexts graphics thread will no longer have the context current and
 any further OpenGL calls in that thread will fail.   The fact that
 this ever worked is surprising...

 If you do want to do a precompile in the way you are doing it'd be
 best to manually create the compile context, use it, then start the
 thread on it, or just then discard the context.

 Robert.

 On Mon, Aug 4, 2008 at 4:31 PM, Serge Lages [EMAIL PROTECTED] wrote:
  Hi all,
 
  I've made some investigations. First of all, I've tested several OSG
  versions with the following code :
 
  osgViewer::Viewer   viewer;
 
  viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
  osg::DisplaySettings::instance()-setCompileContextsHint(true);
  osg::DisplaySettings::instance()-setMaxNumberOfGraphicsContexts(1);
  viewer.setUpViewInWindow(100, 100, 800, 600);
  viewer.setCameraManipulator(new osgGA::TrackballManipulator());
  viewer.realize();
  if (osg::GraphicsContext::getCompileContext(0) != NULL)
  {
  osg::Image*image = osgDB::readImageFile(test.jpg);
  osg::StateSet*stateset 

Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Robert Osfield
On Mon, Aug 4, 2008 at 6:00 PM, Cedric Pinson [EMAIL PROTECTED] wrote:
 I will not have time to try it because of vacation, but often there are
 issue about packaging files (.pc ), so this is just a reminder to check it
 ;)

This one is already covered :-)

# pkg-config source file

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: openscenegraph
Description: 3D scenegraph
Version: 2.6.0
Requires: openthreads
Conflicts:
Libs: -L${libdir} -losg -losgDB -losgFX -losgGA -losgParticle -losgSim
-losgText -losgUtil -losgTerrain -losgManipulator -losgViewer
Cflags: -I${includedir}
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Jean-Sébastien Guay

Hi Robert,


Libs: -L${libdir} -losg -losgDB -losgFX -losgGA -losgParticle -losgSim
-losgText -losgUtil -losgTerrain -losgManipulator -losgViewer


Not that I use Linux that much, or even know what these files are, but 
wouldn't you want to add osgWidget in the above?


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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


Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread GMD GammerMaxyandex.ru
I compiled OpenSceneGraph-2.6.0-rc2 on Windows Vista/XP + VC2008.  All fine!

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


[osg-users] Problems with osgShadow

2008-08-04 Thread Martin Großer
Hello all,

 

I would like create a scene with one object, which can receive shadows and
one object, which can cast a shadow.

So I create an osgShadow::ShadowedScene and I set the
ReceivesShadowTraversalMask (0x1) and the CastsShadowTraversalMask (0x2).
Then I set the ShadowTechnique on ShadowMap and add two nodes. For the first
node I set the node mask on 0x1 and for the second node I set the node mask
on 0x2. My problem is, the second node receive shadows, but this
http://dict.leo.org/ende?lp=endep=thMx..search=should should
http://dict.leo.org/ende?lp=endep=thMx..search=be be
http://dict.leo.org/ende?lp=endep=thMx..search=excluded excluded.

 

Here my code:

 

const int ReceivesShadowTraversalMask = 0x1;

const int CastsShadowTraversalMask = 0x2;

 

int main()

{

  // scene node

  osg::ref_ptrosg::Group root = new osg::Group;

 

  // light node

  osg::ref_ptrosg::LightSource ls = new osg::LightSource;

  osg::ref_ptrosg::Light light = new osg::Light();

  light-setPosition(osg::Vec4(20.0,80.0,80.0,1.0));

  light-setAmbient(osg::Vec4(0.0,0.0,0.0,1.0));

  ls-setLight(light.get());

  root-addChild(ls.get());

 

  // shadow scene

  osg::ref_ptrosgShadow::ShadowedScene scene = new
osgShadow::ShadowedScene;

  scene-setReceivesShadowTraversalMask(ReceivesShadowTraversalMask);

  scene-setCastsShadowTraversalMask(CastsShadowTraversalMask);

 

  // shadow map

  osg::ref_ptrosgShadow::ShadowMap sm = new osgShadow::ShadowMap;

  sm-setTextureSize(osg::Vec2s(2048,2048));

  scene-setShadowTechnique(sm.get());

 

  // load nodes

  osg::ref_ptrosg::Node node01 =
osgDB::readNodeFile(../../objects/ebene.osg);

  node01-setNodeMask(ReceivesShadowTraversalMask);

 

  osg::ref_ptrosg::Node node02 =
osgDB::readNodeFile(../../objects/teekanne.osg);

  node02-setNodeMask(CastsShadowTraversalMask);

 

  scene-addChild(node01.get());

  scene-addChild(node02.get());

  root-addChild(scene.get());

 

  // viewer

  osgViewer::Viewer viewer;

  viewer.setSceneData(root.get());

  viewer.realize();

  viewer.run();

 

  return 0;

}

 

 

 

Can anyone help me?

 

Cheers,

 

Martin

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


Re: [osg-users] Viewer/CompositeViewer

2008-08-04 Thread DanG2015
 
 You are mostly  on the right track. 
Good to hear... the  previous postings described it, but I wanted to make 
sure I was getting  it. 
 A couple of  clarifications: 
 A view's Master Camera can be active  (have its own GraphicsContext) or 
passive (no GraphicsContext). 
This is an area I haven't seen too much written about  (maybe my archive 
search skills 
need to be better, though). 
Looking at osgCompositeViewer example... 
- I see where a CompositeViewer is created 
- I see where the -1 argument would create a view and add it  to the viewer 
- I see where the -2 argument adds 2  views 
- I see where the -3 arg (or no args provided) not  only creates views, but 
also 
creates Traits, then a GraphicsContext  using the Traits, then passes the 
context 
to each of the Cameras it  created 
Again, if you'll pardon beginner questions: 
1)  When the -1 or -2 arguments are used, is  a default graphics context 
created? 
2)  In general, when should one consider creating  a context per Camera vs. 
sharing a 
context between  Cameras? 
3)  Can multiple cameras in the same Viewer have  dramatically different 
context 
traits (e.g., different  RGB depths or double-buffering enabled on  one and 
not the other)? 
4)  (similar Q) If one View in a  CompositeViewer had a Camera with a 
GraphicsContext  with 
windowDecoration (in MS  Windows, the border) enabled and another View had 
a 
GraphicsContext with  decoration disabled, who wins? 
I'll stop here in case I'm missing a significant point  in regards to 
GraphicsContexts.  Under 1.X 
I had more or less associated them conceptually with  Producer's 
RenderSurface and hadn't 
really taken the time to look deeper. 
Thanks again for the information on my earlier post -  it really helps. 
Regards, 
Dan



**Looking for a car that's sporty, fun and fits in your budget? 
Read reviews on AOL Autos.  
(http://autos.aol.com/cars-BMW-128-2008/expert-review?ncid=aolaut000517 
)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Viewer/CompositeViewer

2008-08-04 Thread DanG2015
  Slaves can be moved independently of the main camera by setting their  
reference 
 frames  to ABSOLUTE_RF. Otherwise, yes, they are offset from the main 
camera. 
Ahh,  yes.  That makes sense. 
 I have  used a slave to provide an orthographic overlay (HUD) projection, 
  which has its own unique subgraph. 
Understood...  several out the window cameras could track each other, 
and  the HUD could be ABSOLUTE_RF with its own subgraph. 
 A  single Viewer should be used when there is a single conceptual view,  
while 
 CompositeViewer  should be used when there is more than one 
Right.   Curious (this is probably just semantics)... if I had an  
out-the-window 
view and  an inset bird's-eye view (same scene), would one think of this as 
a single  conceptual view as it's all looking at the same scene? 
I see  now how this could be done in either Viewer or CompositeViewer, but 
just  curious as to what such as setup is considered conceptually. 
Thanks! 

Dan



**Looking for a car that's sporty, fun and fits in your budget? 
Read reviews on AOL Autos.  
(http://autos.aol.com/cars-BMW-128-2008/expert-review?ncid=aolaut000517 
)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Sewell, Kenneth R Civ USAF AFMC AFRL/RYZW
OSG 2.6.0-3c2 compiles and runs on 32-bit openSUSE 11.0.

I did stumble upon one small issue with Virtual Planet Builder though.
GCC 4.3.1 requires cstring to be included to support the calls made to
memcmp and strchr in the file src/vpb/PropertyFile.cpp.  After adding
that include, VPB compiled and ran fine with 2.6.0-rc2.

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


Re: [osg-users] How can I use different shadow-map for different object.

2008-08-04 Thread Jean-Sébastien Guay

Hi GammerMax?

How can I use different shadow-map for different object. 
	For example, I have a big plane and two trees on it. When I 
	put these 3 objects into one ShadowScene texture stretches too much.

Two ShadowScene doesn't work together, so I can't use more than one
texture by object.


I don't think the current shadow map implementation can support this. 
You're welcome to dive in and code it up, or you could use a more modern 
shadow technique like Parallel-Split Shadow Map (in OSG now, but a bit 
buggy) or the upcoming LiSPSM (after 2.6).


Hope this helps,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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


Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Paul Martz
Welcome back, Robert -- sounds like you had a great holiday.

 I have put together an initial draft of the press release (please
 review/comment/amend):
 
http://www.openscenegraph.org/projects/osg/wiki/News/Press/OSG2.6

I made 2 minor typo/grammatical fixes, otherwise looks fine.
   -Paul

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


Re: [osg-users] Matrix Manipulators and set coordinate frame callback. Different behavior in 2.4?

2008-08-04 Thread Robert Osfield
Hi Chris,

On Mon, Aug 4, 2008 at 8:00 PM, Dorosky, Christopher G
[EMAIL PROTECTED] wrote:
 Works as expected for manipulators 2-4 (flight, drive, terrain). Doesn't
 work for #1, which is the trackball manipulator.

 Or maybe there is some problem selecting the trackball manipulator, but
 I don't think so.

The TrackballManipulator doesn't reference the CoordinateFrame at all,
as it doesn't need to for its operation as the trackball manipulation
is effectively in screen space.

Is it that you just want to set your own home position?

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


Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Robert Osfield
On Mon, Aug 4, 2008 at 6:35 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
 Hi Robert,

 Libs: -L${libdir} -losg -losgDB -losgFX -losgGA -losgParticle -losgSim
 -losgText -losgUtil -losgTerrain -losgManipulator -losgViewer

 Not that I use Linux that much, or even know what these files are, but
 wouldn't you want to add osgWidget in the above?

Yes, it makes sense to add osgWidget, now added and checked into
svn/trunk and the OpenSceneGraph-2.6 branch.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Eric Sokolowsky

Robert Osfield wrote:

Hi All,

I have now tagged the 2.6.0 release candidate 2, you can grab it from
the downloads page:

  


Robert,

I have made some minor fixes to the build system for OSX, but they are 
not complete yet. I have been swamped with other pressing issues at work 
and have not finished the work I was starting. The following issues are 
known:


libosgviewer will not build in 64-bit under Carbon (ppc64 or x86_64)
osgviewerWX example will not build in 64-bit under Carbon or X11 (ppc64 
or x86_64)


I want to at least let the user know that the build will fail in the 
first case by adding a fatal error. I think I can just disable the 
latter example from building with 64-bit compiles. There may be a couple 
of other examples that do not compile under 64-bit. I am testing the 
build by making bundle applications.


I'd really like these fixes to make it into this release. However, it's 
not ready yet. I can try to work on it tonight at home, if you can give 
me a day or so. Then I'd like at least a few others to test the build. 
If this is not feasible for this release, I understand, and life will go 
on, and these changes will make it to 2.6.1 or something.


-Eric

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


Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Robert Osfield
Hi Ken,

I've added a string.h to PropertyFile.cpp rather than cstring as some
platforms don't have good Standard C++ lib support.

Could you do an svn update on VPB and let me know if this compiles OK.

Robert.

On Mon, Aug 4, 2008 at 7:15 PM, Sewell, Kenneth R Civ USAF AFMC
AFRL/RYZW [EMAIL PROTECTED] wrote:
 OSG 2.6.0-3c2 compiles and runs on 32-bit openSUSE 11.0.

 I did stumble upon one small issue with Virtual Planet Builder though.
 GCC 4.3.1 requires cstring to be included to support the calls made to
 memcmp and strchr in the file src/vpb/PropertyFile.cpp.  After adding
 that include, VPB compiled and ran fine with 2.6.0-rc2.

 Ken
 ___
 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] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Paul Melis

Robert Osfield wrote:

Hi All,

I have now tagged the 2.6.0 release candidate 2, you can grab it from
the downloads page:

  http://www.openscenegraph.org/projects/osg/wiki/Downloads

Or more directly:

* Zip file containing source code : OpenSceneGraph-2.6.0-rc2.zip
* Subversion tag : svn co
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.6.0-rc2
OpenSceneGraph
* Subversion 2.6 series branch : svn co
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.6
OpenSceneGraph

I have put together an initial draft of the press release (please
review/comment/amend):

   http://www.openscenegraph.org/projects/osg/wiki/News/Press/OSG2.6
  
I made some really minor tweaks to some sentences and highlighted some 
of the tool names with italic.


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


Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Paul Melis

Eric Sokolowsky wrote:

Robert Osfield wrote:

Hi All,

I have now tagged the 2.6.0 release candidate 2, you can grab it from
the downloads page:

  


libosgviewer will not build in 64-bit under Carbon (ppc64 or x86_64)
osgviewerWX example will not build in 64-bit under Carbon or X11 
(ppc64 or x86_64)

What's the build error you get with osgviewerWX?

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


Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Martin Spott
Martin Spott wrote:

 SVN from 10:30 UTC today compiles properly and runs (tested only with
 'osgviewer' and an AC3D model) on IRIX/N32 (MIPSPro) and
 Solaris/SPARC32 (SunStudio),

Ok, the same applies to rc2 - OSG even properly honours the $DISPLAY
when doing GLX over remote network connections !

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Viewer/CompositeViewer

2008-08-04 Thread Jason Daly

[EMAIL PROTECTED] wrote:


Right.  Curious (this is probably just semantics)... if I had an 
out-the-window


view and an inset bird's-eye view (same scene), would one think of this as

a single conceptual view as it's all looking at the same scene?

 


I see now how this could be done in either Viewer or CompositeViewer, but

just curious as to what such as setup is considered conceptually.



I believe the intent would be to use CompositeViewer for that.  Even 
though you're looking at the same scene with both cameras, they're 
really two distinct views.  It's not as if your bird's eye view is a 
part of (or a slave to) the out-the-window view.



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


Re: [osg-users] moving models...

2008-08-04 Thread Gordon Tomlinson
Providing the code you use to set the translation and rotations may help
folks see what may be wrong



__
Gordon Tomlinson 

[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
www.vis-sim.com www.gordontomlinson.com 
__

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tueller,
Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Sent: Monday, August 04, 2008 7:13 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] moving models...

Ok, I updated the transform node as given below for position changes and
this seems to work. However, when I add an orientation update (i.e. multiply
the translation by a rotation) my model disappears completely. Any idea on
what's going on with that? 

Thanks,
-Shayne

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of su hu
Sent: Saturday, August 02, 2008 3:19 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] moving models...

Shayne,
 
In my application, a global buffer is used to input data to osg thread from
other thread.
 
I used the method as same as Todd told you. setMatrix() is used to update
the matrix of that MatrixTransform node.
 
 
...
 
osg::ref_ptrosg::group root;
osg::ref_ptrosg::MatrixTransform MotionMatrix;
osg::ref_ptrosg::node MotionModelFile;   //your motion
model
 
...
root-addchild(MotionMatrix);
 
MotionMatrix-addchild(MotionModelFile);
 
...

 while((!Viewer.done)
 {
...
 
if(Update is Needed)
//position is changed or other
 MotionMatrix--setMatrix(osg::Matrix::translate(Pos));  //your
position data 
 
...
   Viewer.frame();
 
...
}
 
 
 
 
su hu

 
2008/8/2, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
[EMAIL PROTECTED]: 

This is probably a silly and simple question, but does anyone have
an example of how to move a model explicitly without using a canned
animation? Most of the examples I've seen, update the position in an
animation using UpdateCallback. 

 

I have a position update coming from another process outside the
scenegraph that I need to feed into the model to update its position. Do I
need to use an UpdateCallback or a NodeVisitor approach?

 

Any help would be most appreciated.

 

Thanks,

-Shayne


___
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] moving models...

2008-08-04 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Here's my code snippet...

...
while (!viewer-done())
{
if (model_update_needed)
mt-setMatrix(osg::Matrix::rotate(osg::inDegrees(heading),
0.0, 0.0, 1.0) *
  osg::Matrix::translate(modelx, modely,
modelz));
...
viewer-frame();
}

In the code above, if I have just a translate, the model moves just fine as
position changes. Once I multiply by a rotation for a heading change, the
model disappears.

-Shayne

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gordon
Tomlinson
Sent: Monday, August 04, 2008 5:18 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] moving models...

Providing the code you use to set the translation and rotations may help
folks see what may be wrong



__
Gordon Tomlinson 

[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
www.vis-sim.com www.gordontomlinson.com 
__

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tueller,
Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Sent: Monday, August 04, 2008 7:13 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] moving models...

Ok, I updated the transform node as given below for position changes and
this seems to work. However, when I add an orientation update (i.e. multiply
the translation by a rotation) my model disappears completely. Any idea on
what's going on with that? 

Thanks,
-Shayne

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of su hu
Sent: Saturday, August 02, 2008 3:19 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] moving models...

Shayne,
 
In my application, a global buffer is used to input data to osg thread from
other thread.
 
I used the method as same as Todd told you. setMatrix() is used to update
the matrix of that MatrixTransform node.
 
 
...
 
osg::ref_ptrosg::group root;
osg::ref_ptrosg::MatrixTransform MotionMatrix;
osg::ref_ptrosg::node MotionModelFile;   //your motion
model
 
...
root-addchild(MotionMatrix);
 
MotionMatrix-addchild(MotionModelFile);
 
...

 while((!Viewer.done)
 {
...
 
if(Update is Needed)
//position is changed or other
 MotionMatrix--setMatrix(osg::Matrix::translate(Pos));  //your
position data 
 
...
   Viewer.frame();
 
...
}
 
 
 
 
su hu

 
2008/8/2, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
[EMAIL PROTECTED]: 

This is probably a silly and simple question, but does anyone have
an example of how to move a model explicitly without using a canned
animation? Most of the examples I've seen, update the position in an
animation using UpdateCallback. 

 

I have a position update coming from another process outside the
scenegraph that I need to feed into the model to update its position. Do I
need to use an UpdateCallback or a NodeVisitor approach?

 

Any help would be most appreciated.

 

Thanks,

-Shayne


___
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


smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] moving models...

2008-08-04 Thread Gordon Tomlinson
see

http://www.vis-sim.com/osg/osg_faq_1.htm#f15
http://www.vis-sim.com/osg/osg_faq_1.htm#f16


http://www.cs.clemson.edu/~malloy/courses/3dgames-2007/tutor/web/rotation/ro
tation.html

http://www.palomino3d.org/pal/openscenegraph/

__
Gordon Tomlinson 

[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
www.vis-sim.com www.gordontomlinson.com 
__


-Original Message-
From: Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
[mailto:[EMAIL PROTECTED] 
Sent: Monday, August 04, 2008 7:30 PM
To: [EMAIL PROTECTED]; OpenSceneGraph Users
Subject: RE: [osg-users] moving models...

Here's my code snippet...

...
while (!viewer-done())
{
if (model_update_needed)
mt-setMatrix(osg::Matrix::rotate(osg::inDegrees(heading),
0.0, 0.0, 1.0) *
  osg::Matrix::translate(modelx, modely,
modelz));
...
viewer-frame();
}

In the code above, if I have just a translate, the model moves just fine as
position changes. Once I multiply by a rotation for a heading change, the
model disappears.

-Shayne

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gordon
Tomlinson
Sent: Monday, August 04, 2008 5:18 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] moving models...

Providing the code you use to set the translation and rotations may help
folks see what may be wrong



__
Gordon Tomlinson 

[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
www.vis-sim.com www.gordontomlinson.com 
__

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tueller,
Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Sent: Monday, August 04, 2008 7:13 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] moving models...

Ok, I updated the transform node as given below for position changes and
this seems to work. However, when I add an orientation update (i.e. multiply
the translation by a rotation) my model disappears completely. Any idea on
what's going on with that? 

Thanks,
-Shayne

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of su hu
Sent: Saturday, August 02, 2008 3:19 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] moving models...

Shayne,
 
In my application, a global buffer is used to input data to osg thread from
other thread.
 
I used the method as same as Todd told you. setMatrix() is used to update
the matrix of that MatrixTransform node.
 
 
...
 
osg::ref_ptrosg::group root;
osg::ref_ptrosg::MatrixTransform MotionMatrix;
osg::ref_ptrosg::node MotionModelFile;   //your motion
model
 
...
root-addchild(MotionMatrix);
 
MotionMatrix-addchild(MotionModelFile);
 
...

 while((!Viewer.done)
 {
...
 
if(Update is Needed)
//position is changed or other
 MotionMatrix--setMatrix(osg::Matrix::translate(Pos));  //your
position data 
 
...
   Viewer.frame();
 
...
}
 
 
 
 
su hu

 
2008/8/2, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
[EMAIL PROTECTED]: 

This is probably a silly and simple question, but does anyone have
an example of how to move a model explicitly without using a canned
animation? Most of the examples I've seen, update the position in an
animation using UpdateCallback. 

 

I have a position update coming from another process outside the
scenegraph that I need to feed into the model to update its position. Do I
need to use an UpdateCallback or a NodeVisitor approach?

 

Any help would be most appreciated.

 

Thanks,

-Shayne


___
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] Using SSE within OSG

2008-08-04 Thread James Killian


Thanks for the reply.  The delay of review will buy me some time to present 
the aligned matrixf.  It is true that these maths are not the largest 
bottleneck even for our game, but they still are significant! especially 
during  heavy use of collision detection.  I would like to know if Mathias 
submission would be considered now as 99% of it is a c solution to reduce 
the number of multiplies needed.  It did bring the numbers down in our game 
too.  If so, I would like to write SSE forms of these new functions (e.g. 
preMultTranslate) to the aligned matrixf and make them run even faster.


I would be interested in pursuing the traversal related methods, but I have 
a feeling the solution would entail a design solution with C and not an SSE 
one; However, if performance increase is not the top priority on anyone's 
list I'd be willing to look into this and see if I can help.




James Killian
- Original Message - 
From: Robert Osfield

To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Sunday, Aug 3, 2008 05:58 AM
Subject: Re: [osg-users] Using SSE within OSG




Hi Guys,

I've read through the correspondence on this issue, but won't dive in
with reviewing submissions on this topic till well after 2.6.0 is out
the door.

As a general note, there seems to be two related topics - data
alignment and then SSE instructions, they are of course related but
I'd suggest we tackle them separately.

As another general note, in my experience the most common bottleneck
of scene graph based applications is that of CPU memory bandwidth,
maths functions are much less of a bottleneck, and there cost in fact
largely hidden by the cost of waiting for the cache to be filled.  The
performance profiles provided in this threaded suggest this as well -
with the traversal related methods being the biggest bottleneck.  How
to address this bottleneck is a topic for another thread.

Robert.

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


Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

2008-08-04 Thread Ahmed Nawar
Dear All,

I read in 2.6 Updates include this
New database optimizer that is able to remove static transforms by duplicating 
shared geometries

And I want to ask what is best for performance.
- Duplicate geometries  (or)
- Shared geometries and transform them.

thanks,
Ahmed Nawar


From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Paul Melis [EMAIL 
PROTECTED]
Sent: Monday, August 04, 2008 11:50 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged

Robert Osfield wrote:
 Hi All,

 I have now tagged the 2.6.0 release candidate 2, you can grab it from
 the downloads page:

   http://www.openscenegraph.org/projects/osg/wiki/Downloads

 Or more directly:

 * Zip file containing source code : OpenSceneGraph-2.6.0-rc2.zip
 * Subversion tag : svn co
 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.6.0-rc2
 OpenSceneGraph
 * Subversion 2.6 series branch : svn co
 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.6
 OpenSceneGraph

 I have put together an initial draft of the press release (please
 review/comment/amend):

http://www.openscenegraph.org/projects/osg/wiki/News/Press/OSG2.6

I made some really minor tweaks to some sentences and highlighted some
of the tool names with italic.

Paul
___
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