Re: [osg-users] Adding code for movie textures

2008-09-19 Thread Robert Osfield
Hi Patrick,

Playing movies automatically isn't that what all users will want all
the time, so hard coding this in isn't appropriate.  In the past I've
always just used a custom NodeVisitor to traverse through an enable
the movies, this is pretty straight forward to write and retains
complete control to the application developer. You could place such a
visitor inside a osgDB::Registry::ReadFileCallback to apply the
visitor automatically to all loaded models.

Robert.

On Fri, Sep 19, 2008 at 12:53 AM, Patrick A. Webb [EMAIL PROTECTED] wrote:
 I've been trying to find a way to get movie textures to play using only a
 .osg file as the input to osgviewer. From skulking around in the source code
 I figured out how osgviewer --movie plays movies on a polygon and took
 that idea and applied it to the texture handling source files in
 osgPlugins/osg.

 I added the following code to Texture1D.cpp, Texture2D.cpp, Texture3D.cpp
 and TextureRectangle.cpp:

 #include osg/ImageStream

 

 if (fr[0].matchWord(movie)  fr[1].isString())
 {
std::string filename = fr[1].getStr();
Image* image = fr.readImage(filename.c_str());
ImageStream* imagestream = dynamic_castosg::ImageStream*(image);
if (imagestream) {
texture.setImage(imagestream);
imagestream-play();
}
 }

 

 So far it's worked. Is this something that's going to work out in the long
 run? Is there a better way for me to do what I've done?
 ___
 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] CompositeViewer, update traversal, prerender branch

2008-09-19 Thread Robert Osfield
Hi Fabian,

I'm afraid you don't really say enough about the specifics of your
setup for others to know enough to help you.

With your View, do they are share the same GaphicsWindow?  How do you
setup the pre render step?  A slave Camera?  A Camera in the scene
graph, how do you grab the live Camera stream?

What version of the OSG, OS and hardware are you using?

Robert.

On Fri, Sep 19, 2008 at 4:26 AM, Fabian Bützow [EMAIL PROTECTED] wrote:
 Hi everybody,

 Ive got some problems with displaying the result of a prerender step in
 different views.

 The root node has two basic branches:
 a prerender branch that renders and processes a live camera image, and a
 main render branch, that has two subnodes. The output texture of the
 prerender step is applied to the subnodes in different ways. A View is set
 to each subnode to display the specific view of the scene. A third View is
 set to the root node to observe the overall behavior of the texture (applied
 to both subnodes).

 The problem is, that the Texture gets updated in the overall view, but not
 in the subnode views (it shows the initialised static texture, not even the
 updated camera image). When I set the scene data of the subnode views to the
 root, the texture gets updated, but the framerate drops. When i assign no
 View to the scene root, the prerender branch isnt traversed at allAs far
 as i know, the update traversal is called once per frame for a composite
 viewer, that should update the texture in all nodes. Please help me with
 that one.

 Cheers,
 Fabian



 ___
 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] ImageStream current frame

2008-09-19 Thread Robert Osfield
Hi Richard,

These methods are virtual methods, and ImageStream is a base class...
that implementations subclass from, so the fact a header doesn't
implement something doesn't say anything about the actual
implementations that are meant to implement it.

Secondly the getReferenceTime() and TimeMultiplier are an time offset
and multiple, that is used by the ImageStream implementations to
compute the current time, and not the current time of the movie.

The actual time of the movie is something that would have to added to
ImageStream and its implementations, it should be possible to do this,
something like a getMovieTime().

Robert.

On Fri, Sep 19, 2008 at 6:52 AM, Richard Baron Penman
[EMAIL PROTECTED] wrote:
 hello,

 I would like to display what percentage of a video has been played. I'm
 using the ImageStream class and I thought getReferenceTime() or
 getTimeMultiplier() might help me, but they always return 0.

 Examining the header file I found this:
 72 virtual double getLength() const { return 0.0; }
 73
 74 virtual void setReferenceTime(double) {}
 75 virtual double getReferenceTime() const { return 0.0; }
 76
 77 virtual void setTimeMultiplier(double) {}
 78 virtual double getTimeMultiplier() const { return 0.0; }

 So it seems this functionality is not ready yet. Does anyone have an
 alternative way to determine the current playing video frame?

 regards,
 Richard


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


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


Re: [osg-users] Problem with local coordinate!

2008-09-19 Thread Tuan Do
Thanks, I've done it.
I don't know how to reply a post, because this group is annoucement only!?

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


[osg-users] Getting started with OSG and GLSL

2008-09-19 Thread Filip R. Andersson
Hi all,

I would like to add shading effects to my application, which uses OSG, but
have never programmed GLSL or Cg before. Can anyone please guide me to
tutorials or a good source of information about using GLSL with OSG?

I noticed that OSG comes with one or two shading examples but I would like
to see how .osg/.ive files can be loaded to the scenegraph and what kind of
shading information I can embed in the files.

Any direction to where I can do some reading is appreciated.


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


Re: [osg-users] Getting started with OSG and GLSL

2008-09-19 Thread Ümit Uzun
Hi Filip,

I have been studying GLSL in OSG like you :) I have made lots of search and
firstly you should learn GLSL with using in OpenGL programs.
Sources;
1 - http://www.ozone3d.net/index.php
2 - http://www.cs.lth.se/DAT135/
3 - http://graphics.tu-bs.de/teaching/lectures/ss08/CG2/
4 - http://opengl.org/documentation/glsl/
5 -
http://wiki.vislab.usyd.edu.au/moinwiki/Multimedia_Computing_and_Processing/Tutorials
6 - http://www.fas.harvard.edu/~lib175/materials.html
7 - http://www.vislab.usyd.edu.au/?q=wiki/GLSL_Basics
8 -
http://wiki.vislab.usyd.edu.au/moinwiki/Multimedia_Computing_and_Processing/Tutorials/OpenGL_Basics?highlight=(basics)|(opengl)
9 -
http://zach.in.tu-clausthal.de/teaching/cg2_07/literatur/glsl_tutorial/index.html
10 - http://www.clockworkcoders.com/oglsl/tutorials.html
11 - http://www.typhoonlabs.com/
12 - http://developer.amd.com/gpu/rendermonkey/Pages/default.aspx#prog
13 - http://www.lighthouse3d.com/opengl/glsl/

and you can find much of them from Google but If you are newbie like me you
should first read http://www.lighthouse3d.com/opengl/glsl/  and
http://www.typhoonlabs.com/ tutorials and learn the samples. And you can
look at RenderMonkey samples to grasp what you can do with glsl.

I think you can write your GLSL embeded osg scene in ive or osg like
glsl_confetti.osg, glsl_julia.osg and etc. For example I will planing to
create bouncing fish model with using GLSL vertex shader and embeded this
model to the osg file so I can get simple prepared bouncing model to use in
any program only loading fish.osg :)

Good Luck.

Umit Uzun

2008/9/19 Filip R. Andersson [EMAIL PROTECTED]

 Hi all,

 I would like to add shading effects to my application, which uses OSG, but
 have never programmed GLSL or Cg before. Can anyone please guide me to
 tutorials or a good source of information about using GLSL with OSG?

 I noticed that OSG comes with one or two shading examples but I would like
 to see how .osg/.ive files can be loaded to the scenegraph and what kind of
 shading information I can embed in the files.

 Any direction to where I can do some reading is appreciated.


 Cheers,
 Filip

 ___
 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] osgPPU down...

2008-09-19 Thread Doug McCorkle

Hello,

It appears the osgPPU site is down: http://projects.tevs.eu/osgppu. I  
am hoping the owner might be on this list to be able to get the site  
back up again.


Doug

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


Re: [osg-users] osgPPU down...

2008-09-19 Thread Bart Kevelham
http://projects.tevs.eu/osgPPU should do the trick

2008/9/19 Doug McCorkle [EMAIL PROTECTED]

 Hello,

 It appears the osgPPU site is down: http://projects.tevs.eu/osgppu. I am
 hoping the owner might be on this list to be able to get the site back up
 again.

 Doug

 ___
 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] osgPPU down...

2008-09-19 Thread Doug McCorkle

Thanks! The site is not linked properly here:

http://www.openscenegraph.org/projects/osg/wiki/Community/People/ArtTevs

On Sep 19, 2008, at 4:33 AM, Bart Kevelham wrote:


http://projects.tevs.eu/osgPPU should do the trick

2008/9/19 Doug McCorkle [EMAIL PROTECTED]
Hello,

It appears the osgPPU site is down: http://projects.tevs.eu/osgppu.  
I am hoping the owner might be on this list to be able to get the  
site back up again.


Doug


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


Re: [osg-users] osgPPU down...

2008-09-19 Thread Art Tevs
Hi guys,

yeah sorry, I was moving the repository and all my pages to another server. In 
between time there were some DNS issues (there are still there, because 
unfortunately correct information is propagating to all DNS servers very 
slowly), therefor osgPPU was not reachable.

Now it should work again (over /osgPPU and /osgppu). Currently I still have 
some problems with svn over apache and I am trying to solve them. I hope it 
will work today.

Cheers,
Art


--- Doug McCorkle [EMAIL PROTECTED] schrieb am Fr, 19.9.2008:

 Von: Doug McCorkle [EMAIL PROTECTED]
 Betreff: Re: [osg-users] osgPPU down...
 An: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Datum: Freitag, 19. September 2008, 11:38
 Thanks! The site is not linked properly here:
 
 http://www.openscenegraph.org/projects/osg/wiki/Community/People/ArtTevs
 
 On Sep 19, 2008, at 4:33 AM, Bart Kevelham wrote:
 
  http://projects.tevs.eu/osgPPU should do the trick
 
  2008/9/19 Doug McCorkle [EMAIL PROTECTED]
  Hello,
 
  It appears the osgPPU site is down:
 http://projects.tevs.eu/osgppu.  
  I am hoping the owner might be on this list to be able
 to get the  
  site back up again.
 
  Doug
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

__
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen 
Massenmails. 
http://mail.yahoo.com 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CompositeViewer, update traversal, prerender branch

2008-09-19 Thread Fabian Bützow

Ok, sorry Robert, now more specifically:

Hardware/software: WinXP, Opteron 2 GHz, 1 GB Ram, Geforce 8800 GS, OSG 2.4.

The prerender node has 5 camera nodes, a textured rectangle is attached 
to each camera node. The cameras render to texture in a defined 
RenderOrder. The textures of the rectangles are connected in a way that 
the output of one RTT camera is the input of the next. The pointer to 
the final texture is stored in a data class. The live-camera image is 
retrieved via CMUfirewire API, and updated in a StateAttribute::Callback 
function attached to the initial live-camera texture.


The Views are defined by the setUpViewInWindow() functions and added to 
a CompositeViewer. The scene data of the overall View (A) is set to the 
root node (thats the View that shows the updated texture), the scene 
data of the other two Views(B,C) is set to the subnodes in the scene 
graph. The camera position of each View is set via the 
getCamera()-setProjection() / ViewMatrix() methods. Rectangles are 
attached to the subnodes that should display the output of the prerender 
step (they get the texture via the pointer in the data class), but the 
textures dont get updated in the subviews B,C (they remain in their 
initialised state). I call CompositeViewer-frame() in the render loop. 
(No slave cameras or anything like that.)


The strange thing is, when I set the scene data of View B or C to the 
root node, the rendered textures get updated. (Maybe then, for this View 
the prerender branch is also traversed, causing the loss of fps, but on 
the other hand the Callback of the live-camera texture is called only 
once per frame..)


Thanks for your interest,
cheers,
Fabian
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg movie

2008-09-19 Thread Gordon Tomlinson
Please search the OSG mail archives, this topic has been covered several
times and there are several routes u could consider

http://www.mail-archive.com/osg-users@lists.openscenegraph.org


__
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 Qiu Li
Sent: Thursday, September 18, 2008 2:56 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] osg movie

hi, all,

How can I record a movie(like avi file) easily?

thanks
Qiu Li

___
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] Profiler with OSG

2008-09-19 Thread Vincent Bourdier
No one never profile his OSG code ?

I found a tool named visual leak detector... but it returns me a lot of
leaks in OSG, I suppose in relation with ref_ptr
For the moment I am looking at a memory leak detector only. (a profiler too,
but it is too hard to find a free one)

Thanks for help.

Regards,
Vincent.

2008/9/18 Vincent Bourdier [EMAIL PROTECTED]

 Hi,

 Searching memory leaks, I use some libraries looking at leaks but it is
 very difficult to know  if a leak is really one or not, specially due to
 ref_prt.

 Is there any free profiler (memory, time, number of acces, ...) for windows
 or even for VS 2005 (not Team edition) to trace an OSG based program ?

 Thanks a lot.

 Regards,
 Vincent.

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


Re: [osg-users] CompositeViewer, update traversal, prerender branch

2008-09-19 Thread Robert Osfield
Hi Fabian,

The first problem to resolve is the fact that views are each using a
separate GraphicsWindow, this means a separate GraphicsContext for
each view, which in term means that FBO's/texture objects/display
lists have be duplicated for each context, unless you enable sharing
of contexts, but this itself introduces other problems.

The best thing you could do would be to create a single GraphicsWindow
and then share this between all your Views, you then won't have an
problems with rendering order and sharing of textures or FBOs as it'll
all be on one graphics context.  See the sogcompositeviewer example
for how to set up the Views/Camera  GraphicsWindow.

Robert.

On Fri, Sep 19, 2008 at 11:17 AM, Fabian Bützow [EMAIL PROTECTED] wrote:
 Ok, sorry Robert, now more specifically:

 Hardware/software: WinXP, Opteron 2 GHz, 1 GB Ram, Geforce 8800 GS, OSG 2.4.

 The prerender node has 5 camera nodes, a textured rectangle is attached to
 each camera node. The cameras render to texture in a defined RenderOrder.
 The textures of the rectangles are connected in a way that the output of one
 RTT camera is the input of the next. The pointer to the final texture is
 stored in a data class. The live-camera image is retrieved via CMUfirewire
 API, and updated in a StateAttribute::Callback function attached to the
 initial live-camera texture.

 The Views are defined by the setUpViewInWindow() functions and added to a
 CompositeViewer. The scene data of the overall View (A) is set to the root
 node (thats the View that shows the updated texture), the scene data of the
 other two Views(B,C) is set to the subnodes in the scene graph. The camera
 position of each View is set via the getCamera()-setProjection() /
 ViewMatrix() methods. Rectangles are attached to the subnodes that should
 display the output of the prerender step (they get the texture via the
 pointer in the data class), but the textures dont get updated in the
 subviews B,C (they remain in their initialised state). I call
 CompositeViewer-frame() in the render loop. (No slave cameras or anything
 like that.)

 The strange thing is, when I set the scene data of View B or C to the root
 node, the rendered textures get updated. (Maybe then, for this View the
 prerender branch is also traversed, causing the loss of fps, but on the
 other hand the Callback of the live-camera texture is called only once per
 frame..)

 Thanks for your interest,
 cheers,
 Fabian
 ___
 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] Profiler with OSG

2008-09-19 Thread Alberto Luaces
El Viernes 19 Septiembre 2008ES 13:00:57 Vincent Bourdier escribió:
 No one never profile his OSG code ?

Yes, but with the Linux-only valgrind tool :)

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


Re: [osg-users] Profiler with OSG

2008-09-19 Thread Vincent Bourdier
I know... but I am under windows... and so I have to forget this one... :'(
No one under windows ?

Thanks.

2008/9/19 Alberto Luaces [EMAIL PROTECTED]

 El Viernes 19 Septiembre 2008ES 13:00:57 Vincent Bourdier escribió:
  No one never profile his OSG code ?

 Yes, but with the Linux-only valgrind tool :)

 http://valgrind.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] Profiler with OSG

2008-09-19 Thread Thibault Genessay
Hi Vincent

On Fri, Sep 19, 2008 at 1:12 PM, Vincent Bourdier
[EMAIL PROTECTED] wrote:
 I know... but I am under windows... and so I have to forget this one... :'(
 No one under windows ?

You could try IBM Rational Purify. It's quite a nice tool and you can
download a trial version.
(You can also try to port your code to Linux. You get a triple
benefit: you can cross-check your code for compiler-specific hidden
bugs, you can use Valgrind and your app will run under Linux.)

 Searching memory leaks, I use some libraries looking at leaks but it is very 
 difficult to know  if a leak is really one or not, specially due to ref_prt.
 Is there any free profiler (memory, time, number of acces, ...) for windows 
 or even for VS 2005 (not Team edition) to trace an OSG based program ?

I've never come across difficulties with ref_ptrs themselves. If you
don't create circular dependencies, they will free the memory they
point to and the memory leak detector will not report a false
positive. If you use the Microsoft compiler, do you get any reports
when leak detection is turned on ? (i.e. by calling
_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) |
(_CRTDBG_LEAK_CHECK_DF)); at the beginning of your program)
If you do have reports here you obviously have a memory leak due to a
programming error, not related to ref_ptrs.

Regards

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


[osg-users] Latest SVN Version

2008-09-19 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

I updated my working copy to latest SVN version (8900) of OpenSceneGraph.
 I am wondering way the performance (more fluid) for pagedLOD models has
changed, its more fast / fluid while paging under windows vista.
what did we change, threading?


good work

adrian


-- 

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


Re: [osg-users] Problem with local coordinate!

2008-09-19 Thread Tomlinson, Gordon
uhhh, well you just replied ???
 

Gordon

__
Gordon Tomlinson

Product Manager 3D
Email  : gtomlinson @ overwatch.textron.com


__


Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival 
- Master Tambo Tetsura

 
 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tuan Do
Sent: Friday, September 19, 2008 4:09 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Problem with local coordinate!


Thanks, I've done it.
I don't know how to reply a post, because this group is annoucement only!?

-- 
ЯicKy

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


Re: [osg-users] Profiler with OSG

2008-09-19 Thread Vincent Bourdier
Hi thibault

I just have tried with the microsoft compiler. I still have some memory
leaks, but the ouput is unreadable :

[...]
{431278} normal block at 0x12194A50, 108 bytes long.
 Data:  {\  FC 7B 5C 10 00 00 00 00 01 00 00 00 00 00 00 00
{431277} normal block at 0x12194A08, 12 bytes long.
 Data: U O T P S R  55 03 4F 03 54 03 50 03 53 03 52 03
[...]

I just need the line code where to find the leak but I am not able to do
it... I added #define _CRTDBG_MAP_ALLOC but nothing appear...
Any suggestion to get the file and line number ?

thanks a lot.
Regards,
Vincent.

2008/9/19 Thibault Genessay [EMAIL PROTECTED]

 Hi Vincent

 On Fri, Sep 19, 2008 at 1:12 PM, Vincent Bourdier
 [EMAIL PROTECTED] wrote:
  I know... but I am under windows... and so I have to forget this one...
 :'(
  No one under windows ?

 You could try IBM Rational Purify. It's quite a nice tool and you can
 download a trial version.
 (You can also try to port your code to Linux. You get a triple
 benefit: you can cross-check your code for compiler-specific hidden
 bugs, you can use Valgrind and your app will run under Linux.)

  Searching memory leaks, I use some libraries looking at leaks but it is
 very difficult to know  if a leak is really one or not, specially due to
 ref_prt.
  Is there any free profiler (memory, time, number of acces, ...) for
 windows or even for VS 2005 (not Team edition) to trace an OSG based program
 ?

 I've never come across difficulties with ref_ptrs themselves. If you
 don't create circular dependencies, they will free the memory they
 point to and the memory leak detector will not report a false
 positive. If you use the Microsoft compiler, do you get any reports
 when leak detection is turned on ? (i.e. by calling
 _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) |
 (_CRTDBG_LEAK_CHECK_DF)); at the beginning of your program)
 If you do have reports here you obviously have a memory leak due to a
 programming error, not related to ref_ptrs.

 Regards

 Thibault
 ___
 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] Latest SVN Version

2008-09-19 Thread Robert Osfield
Hi Adrian,

It's nice to hear that performance is looking good, but... as to what
changed all depends upon the delta between the last time your tested
and when you just did your svn update.

Robert.

On Fri, Sep 19, 2008 at 12:54 PM, Adrian Egli OpenSceneGraph (3D)
[EMAIL PROTECTED] wrote:
 Hi all,

 I updated my working copy to latest SVN version (8900) of OpenSceneGraph.
  I am wondering way the performance (more fluid) for pagedLOD models has
 changed, its more fast / fluid while paging under windows vista.
 what did we change, threading?


 good work

 adrian


 --
 
 Adrian Egli

 ___
 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] Profiler with OSG

2008-09-19 Thread Sergey Kurdakov
Hello Vincent

try visual memory leak detector

http://dmoulding.googlepages.com/vld

it is easy - just add a header and a lib then you get reports which lead to
the lines in your code.

Regards
Sergey Kurdakov

On Fri, Sep 19, 2008 at 4:08 PM, Vincent Bourdie
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] A couple of Cmake issues with 2.6

2008-09-19 Thread Philip Lowman
On Thu, Sep 18, 2008 at 11:48 AM, Tomlinson, Gordon 
[EMAIL PROTECTED] wrote:

  found the issue with the
  cl : Command line warning D9025 : overriding
 '/Fotg_OpenThreads.dir\Debug\' with '/Fo'
 cl : Command line error D8016 : '/fp:fast' and '/fp:except' command-line
 options are incompatible
 Some command line option were gettng added incorrectly so rjust removing
 them all solved that

 Still not sure why I get osg.lib and osgD.lib in my debug linker inputs


Could you elaborate a bit more?  Are you getting osg.lib and osgD.lib inputs
in your own CMake project or is this within the OSG?  What version of OSG /
CMake are you using?

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


Re: [osg-users] Problems with multi-monitor and DrawThreadPerContext mode

2008-09-19 Thread Serge Lages
Thanks again Robert for these informations.

I've made some tests and everything fails :

- I've tweaked osg::Object to have all the objects in DYNAMIC, it still
crash.
- I've installed the NVIDIA beta drivers, it doesn't change anything.
- I've tested the CullDrawThreadPerContext mode, still the same crash.
- I've tested with a simple model and not my whole application.

It only works on SingleThreaded mode, but the frame drop in this mode is not
acceptable. :/
I'll continue to investigate on the subject but I start to desesperate.

My application uses a CompositeViewer with different osgViewer::View for
each window, I'll try different setups to see if it still crash.

On Thu, Sep 18, 2008 at 9:43 PM, Robert Osfield [EMAIL PROTECTED]wrote:

 Hi Serge,

 On Thu, Sep 18, 2008 at 5:36 PM, Serge Lages [EMAIL PROTECTED]
 wrote:
  As a side note, setting a drawable to DYNAMIC protects it from being
  modified by the update traversal,

 No, it doesn't affect your ability to update, it doesn't affect the
 update traversal at all, it's just a hint from the app developer to
 the draw traversal that that object will be updated, so drawables and
 stateset that you update in the update traversal should have a
 DataVariance of DYNAMIC, the rest should be STATIC.

  but if I remove a drawable (or its geode)
  from the scene during the update, do I need to set it to DYNAMIC too ? In
  other words, drawables in STATIC mode are the only ones which are never
  modified nor removed from the scene ?

 Adding or removing Drawable or StateSet is safe, you don't need to
 protect this at all as the draw traversal retains it's own references
 to prevent the objects from getting deleted.

 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] Profiler with OSG

2008-09-19 Thread Thibault Genessay
Hi Vincent

On Fri, Sep 19, 2008 at 2:08 PM, Vincent Bourdier
[EMAIL PROTECTED] wrote:
 Hi thibault

 I just have tried with the microsoft compiler. I still have some memory
 leaks, but the ouput is unreadable :

 [...]
 {431278} normal block at 0x12194A50, 108 bytes long.
  Data:  {\  FC 7B 5C 10 00 00 00 00 01 00 00 00 00 00 00 00
 {431277} normal block at 0x12194A08, 12 bytes long.
  Data: U O T P S R  55 03 4F 03 54 03 50 03 53 03 52 03
 [...]

This is quite expected, unless you leak a memory block containing a
string. Anyway, the valuable information here is:
- the allocation number of the block (here, 431278 and 431277)
- the length (108 bytes and 12 bytes)

To chase the bug, you need to find the lowest allocation number that
results in a leak, since further allocations might be done by the
object that is leaking and fixing the first leak may fix others -
maybe all if you are lucky :)

Once you have this, you need to re-run your program a few times to see
if this allocation number changes. If it does, you are in trouble (see
below). If it does not, then what you need to do is to call
_CrtSetBreakAlloc(your allocation number);
at the beginning of the program and run it under the debugger. When
the allocation number is hit, you get a popup from the debugger and
you are pointed to the exact instruction that triggers the allocation.
With this information you can hopefully find why the memory block is
never freed.

If the allocation number changes from run to run, it means that there
is some kind of random process bothering you. This typically happens
in GUIs as the user moves the mouse pointer, triggering events that
allocate memory and it is impossible to recreate the exact same order
of allocations between two runs. Facing this kind of horror, two
techniques can help you:
- try to reduce the program by removing all interactions and any other
source of randomness until the leaking allocation number does not
change between runs
- track the allocation size with a hook. Let me explain this further:

You can place a hook (i.e. callback) for each allocation with the
function _CrtSetAllocHook():

First, our callback:
int MyAllocHook( int allocType, void *userData, size_t size, int
blockType, long requestNumber, const unsigned 
char *filename, int
lineNumber)
{
// This is called upon each allocation. Return TRUE to allow
the allocation, FALSE to make it fail
return TRUE;
}

and then at the beginning of the program:
_CrtSetAllocHook(MyAllocHook)

Now your hook is called for each allocation. To find the mysterious
allocation that leaks, try to find a range of numbers (e.g. the first
block that leaks is almost always in 431000..431300) and use the
allocation size in an if test such as:

if (size == the size of your block  requestNumber = 431000 
requestNumber = 431300)
  int dummy = 0;

Place a breakpoint on the int dummy=0 line. It will hopefully be hit
once during  the faulty allocation. If it is hit more than once, try
to narrow the allocation range as much as you can.

You can as well use the hook instead of the _CrtSetBreakAlloc() call
since you are given the allocation number in it.

Hope this helps

Thibault


 I just need the line code where to find the leak but I am not able to do
 it... I added #define _CRTDBG_MAP_ALLOC but nothing appear...
 Any suggestion to get the file and line number ?

 thanks a lot.
 Regards,
 Vincent.

 2008/9/19 Thibault Genessay [EMAIL PROTECTED]

 Hi Vincent

 On Fri, Sep 19, 2008 at 1:12 PM, Vincent Bourdier
 [EMAIL PROTECTED] wrote:
  I know... but I am under windows... and so I have to forget this one...
  :'(
  No one under windows ?

 You could try IBM Rational Purify. It's quite a nice tool and you can
 download a trial version.
 (You can also try to port your code to Linux. You get a triple
 benefit: you can cross-check your code for compiler-specific hidden
 bugs, you can use Valgrind and your app will run under Linux.)

  Searching memory leaks, I use some libraries looking at leaks but it is
  very difficult to know  if a leak is really one or not, specially due to
  ref_prt.
  Is there any free profiler (memory, time, number of acces, ...) for
  windows or even for VS 2005 (not Team edition) to trace an OSG based 
  program
  ?

 I've never come across difficulties with ref_ptrs themselves. If you
 don't create circular dependencies, they will free the memory they
 point to and the memory leak detector will not report a false
 positive. If you use the Microsoft compiler, do you get any reports
 when leak detection is turned on ? (i.e. by calling
 _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) |
 (_CRTDBG_LEAK_CHECK_DF)); at the beginning of your program)
 If you do have reports here you obviously have a memory leak due to a
 programming error, not related to ref_ptrs.

 Regards

 Thibault
 ___
 osg-users mailing list
 

Re: [osg-users] Problems with multi-monitor and DrawThreadPerContext mode

2008-09-19 Thread Robert Osfield
HI Serge,

What happens with the OSG examples on this setup?

Is there any chance you could dual boot and test out under Linux, it
wouldn't solve the problem you have under XP directly, but it would at
least provide another data point into the nature of the problem.  If
it crashes under Linux then there is good chance that it's an OSG or
your app related problem, which is easier for us to track down and
solve.

Also have you been able to get stack traces?

Robert.

On Fri, Sep 19, 2008 at 1:33 PM, Serge Lages [EMAIL PROTECTED] wrote:
 Thanks again Robert for these informations.

 I've made some tests and everything fails :

 - I've tweaked osg::Object to have all the objects in DYNAMIC, it still
 crash.
 - I've installed the NVIDIA beta drivers, it doesn't change anything.
 - I've tested the CullDrawThreadPerContext mode, still the same crash.
 - I've tested with a simple model and not my whole application.

 It only works on SingleThreaded mode, but the frame drop in this mode is not
 acceptable. :/
 I'll continue to investigate on the subject but I start to desesperate.

 My application uses a CompositeViewer with different osgViewer::View for
 each window, I'll try different setups to see if it still crash.

 On Thu, Sep 18, 2008 at 9:43 PM, Robert Osfield [EMAIL PROTECTED]
 wrote:

 Hi Serge,

 On Thu, Sep 18, 2008 at 5:36 PM, Serge Lages [EMAIL PROTECTED]
 wrote:
  As a side note, setting a drawable to DYNAMIC protects it from being
  modified by the update traversal,

 No, it doesn't affect your ability to update, it doesn't affect the
 update traversal at all, it's just a hint from the app developer to
 the draw traversal that that object will be updated, so drawables and
 stateset that you update in the update traversal should have a
 DataVariance of DYNAMIC, the rest should be STATIC.

  but if I remove a drawable (or its geode)
  from the scene during the update, do I need to set it to DYNAMIC too ?
  In
  other words, drawables in STATIC mode are the only ones which are never
  modified nor removed from the scene ?

 Adding or removing Drawable or StateSet is safe, you don't need to
 protect this at all as the draw traversal retains it's own references
 to prevent the objects from getting deleted.

 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


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


Re: [osg-users] A couple of Cmake issues with 2.6

2008-09-19 Thread Tomlinson, Gordon
Hi Philip
 
This is with the Cmake 2.4 or 2.6 using the OSG 2.6x branch
 
In the resultant vcproj files created many(most) projects end up with
both osg.lib and osgd.lib and some with osgGA.lib and osgGAd.lib and
those the use OpenThreads
 
Now I'm quite sure it is something we ( meaning me ) has screwed up some
how/were ;), as I said I'm a newbie when it comes to the minutia of
Cmake
 
the one thing we do is as a pre_fix to all the dll's and lib's  'tg_' to
stop any library/dll's clashes etc  with other projects in doing this we
probably 
 
 

Gordon

__
Gordon Tomlinson

Product Manager 3D
Email  : gtomlinson @ overwatch.textron.com


__
(C): (+1) 571-265-2612
(W): (+1) 703-437-7651

Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival 
- Master Tambo Tetsura

 
 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Philip
Lowman
Sent: Friday, September 19, 2008 8:32 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] A couple of Cmake issues with 2.6


On Thu, Sep 18, 2008 at 11:48 AM, Tomlinson, Gordon
[EMAIL PROTECTED] wrote:


found the issue with the

cl : Command line warning D9025 : overriding
'/Fotg_OpenThreads.dir\Debug\' with '/Fo'
cl : Command line error D8016 : '/fp:fast' and '/fp:except'
command-line options are incompatible
Some command line option were gettng added incorrectly so rjust
removing them all solved that
 
Still not sure why I get osg.lib and osgD.lib in my debug linker
inputs


Could you elaborate a bit more?  Are you getting osg.lib and osgD.lib
inputs in your own CMake project or is this within the OSG?  What
version of OSG / CMake are you using?


-- 
Philip Lowman

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


Re: [osg-users] Profiler with OSG

2008-09-19 Thread Jean-Sébastien Guay

Hi Vincent,


No one never profile his OSG code ?


I think everyone has different ways of working. I tend to evaluate 
performance with the Stats Handler and try out different variations of 
algorithms to see which one performs better. I've rarely needed to do 
actual profiling.


When I did need to, I've used AQTime and gDebugger for general and 
OpenGL profiling respectively. Neither is free though.


Apparently if you're on Linux you can use valgrind to find memory leaks 
(and I hear that either it understands ref_ptr natively or there's a 
workaround to eliminate the related false positives) and oprofile to 
profile your code. I don't work on Linux enough to have had to use them 
myself though.


Sorry I can't help more,

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] Latest SVN Version

2008-09-19 Thread Jean-Sébastien Guay

Hi Adrian,


I updated my working copy to latest SVN version (8900) of OpenSceneGraph.
 I am wondering way the performance (more fluid) for pagedLOD models has 
changed, its more fast / fluid while paging under windows vista.

what did we change, threading?


Perhaps it's the matrix multiplication optimization that went in this 
past week?


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] Problems with multi-monitor and DrawThreadPerContext mode

2008-09-19 Thread Jean-Sébastien Guay

Hi Serge,

My application uses a CompositeViewer with different osgViewer::View for 
each window, I'll try different setups to see if it still crash.


If osgviewer (or osgcompositeviewer) itself does not crash, and your app 
crashes, you could try to start with osgviewer.cpp (or 
osgcompositeviewer.cpp) and work up to something that looks like your 
application. Add one thing at a time, and test to see if the crash happens.


At this point it's really hard to say if the problem you're seeing is an 
OSG bug, a driver bug or a bug in your application, but since no one 
here seems to be able to reproduce what you're seeing, I'd suspect the 
latter until you can prove the contrary... So as I said, work up from 
something simple that doesn't crash to something that looks like your 
app, and you might find what you're doing that causes the crash.


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] A couple of Cmake issues with 2.6

2008-09-19 Thread Jean-Sébastien Guay

Hi Gordon,

In the resultant vcproj files created many(most) projects end up with 
both osg.lib and osgd.lib and some with osgGA.lib and osgGAd.lib and 
those the use OpenThreads
 
Now I'm quite sure it is something we ( meaning me ) has screwed up some 
how/were ;), as I said I'm a newbie when it comes to the minutia of Cmake


I have never seen such a problem... What steps do you take when 
generating the project files with CMake?


I'd suggest deleting your build directory and starting the generation 
from scratch to see if it was some glitch or weird occurence that caused 
the problem.


http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio

(in case it can help...)

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] osgCairo, osgPango

2008-09-19 Thread Jeremy Moles
On Thu, 2008-09-18 at 20:54 -0400, Jean-Sébastien Guay wrote:
 Hi Jeremy,
 
  In the hope that my wandering will help someone in the future...
 
 Incidentally, I thought this info would be useful to other potential 
 users of your nodekits on Windows, but I can't find an add page button 
 for the wiki on osgpango.googlecode.org... Do new pages need to be added 
 by the project administrator?

This is all good info! I have a meeting in a few minutes, but I'll try
to respond in more thorough means (I'd love to get this all written down
for my OWN Windows testing) in an hour or so...

Thanks a ton, as usual!

 J-S

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


Re: [osg-users] Profiler with OSG

2008-09-19 Thread Vincent Bourdier
Hi

@Sergey : I currently do it, but it returns me a lot of leak, and a lot
looks like false positive...

Thanks Jean-Sébastien for AQTime ans gDebugger, I'll have a look at these.

Thibault, thanks a lot for this very detailed answer. I think I will find my
problems with all these possibilities.

Thanks a lot, I'll tell you if I find an easy solution to find memory leaks.

Regards,
Vincent.


2008/9/19 Jean-Sébastien Guay [EMAIL PROTECTED]

 Hi Vincent,

  No one never profile his OSG code ?


 I think everyone has different ways of working. I tend to evaluate
 performance with the Stats Handler and try out different variations of
 algorithms to see which one performs better. I've rarely needed to do actual
 profiling.

 When I did need to, I've used AQTime and gDebugger for general and OpenGL
 profiling respectively. Neither is free though.

 Apparently if you're on Linux you can use valgrind to find memory leaks
 (and I hear that either it understands ref_ptr natively or there's a
 workaround to eliminate the related false positives) and oprofile to profile
 your code. I don't work on Linux enough to have had to use them myself
 though.

 Sorry I can't help more,

 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

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


[osg-users] 16 bits per component off-screen rendering

2008-09-19 Thread Jonathan Richard
Hi, I would like to perform 16 bits per component off-screen rendering. In
particular I need that each color channel (RGBA) be in 16 bits. I red that
it maybe possible by using the framebuffer object extension. Can someone can
confirm to me that this is possible? Does OpenSceneGraph 2.2 support the use
of the framebuffer object extension of I need to update it at least to the
version 2.4? If you have any hint about 16 bits per component off-screen
rendering, please tell me. Thank you

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


[osg-users] ref_ptr wrong utilisation ?

2008-09-19 Thread Vincent Bourdier
Hi,

Looking for memory leaks, Visual Leak Detector return me that :

-- Block 0 at 0x01F12C18: 100 bytes --
  Call Stack:
z:\projets\easymonitoring\3dem\trunk\include\terrain\textureinit.h (39):
TextureInit::TextureInit
z:\projets\easymonitoring\3dem\trunk\src\terrain\terrain.cpp (21):
`dynamic initializer for 'textureInit''
f:\sp\vctools\crt_bld\self_x86\crt\src\crt0dat.c (855): _initterm
f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c (512): __tmainCRTStartup
f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c (414): mainCRTStartup
0x7C816FD7 (File and line number not available):
RegisterWaitForInputIdle
  Data:
[...]

with the following code :

class TextureInit  {

 public:

 TextureInit( unsigned int numCol, unsigned int numRow )
{
[...]

_texCoord = new osg::Vec2Array( numCol * numRow ); //l 39.
[...]
}

~TextureInit()
 {
_texCoord = NULL;
 }

//get method returning ref_prt
[...]

protected:

osg::ref_ptrosg::Vec2Array_texCoord;
}


TextureInit  is declarer as a global delcaration... maybe this can be the
only problem..

Any idea ?

Thanks,
Regards,

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


Re: [osg-users] ref_ptr wrong utilisation ?

2008-09-19 Thread Paul Martz
If TextureInit is, for example, a singleton that persists for the life of
the application, then it's destructor never gets called. However, it only
allocates once. If this is the case, then technically speaking it's not a
leak, at least not the kind of leak that would impact anyone's application.
 


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Vincent
Bourdier
Sent: Friday, September 19, 2008 8:35 AM
To: osg
Subject: [osg-users] ref_ptr wrong utilisation ?



Hi,

Looking for memory leaks, Visual Leak Detector return me that : 

-- Block 0 at 0x01F12C18: 100 bytes --
  Call Stack:
z:\projets\easymonitoring\3dem\trunk\include\terrain\textureinit.h (39):
TextureInit::TextureInit
z:\projets\easymonitoring\3dem\trunk\src\terrain\terrain.cpp (21):
`dynamic initializer for 'textureInit''
f:\sp\vctools\crt_bld\self_x86\crt\src\crt0dat.c (855): _initterm
f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c (512): __tmainCRTStartup
f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c (414): mainCRTStartup
0x7C816FD7 (File and line number not available):
RegisterWaitForInputIdle
  Data:
[...]

with the following code : 

class TextureInit  {

 public:


 TextureInit( unsigned int numCol, unsigned int numRow ) 
{

[...]


_texCoord = new osg::Vec2Array( numCol * numRow ); //l 39.

[...]

}

~TextureInit()
 {
_texCoord = NULL;
 }


//get method returning ref_prt
[...]

protected:

osg::ref_ptrosg::Vec2Array_texCoord;
}


TextureInit  is declarer as a global delcaration... maybe this can be the
only problem..

Any idea ?

Thanks,
Regards,

Vincent.


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


Re: [osg-users] how to get model scale?

2008-09-19 Thread Jolley, Thomas P
Hi Cliff, Forest,

Read the camera analogy in the viewing chapter of the OpenGl red book.   It 
will help with everyone having the same definitions of zoom and scale.  And, a 
better chance the original post can be answered with a question using terms we 
can understand.

Positioning the viewing volume (moving your eyepoint or camera) is not the same 
as zoom or scale but could easily be confused as either.  This is the view 
matrix.  Cliff's post seems to call this zoom.

Scale is a modeling transformation.  In an osg scenegraph a MatrixTransform or 
related nodes modify the scale of an object (or scene if the top node is an MT).

Zoom is a projection transformation.  Change the field of view to change the 
zoom.

Forest, we don't know what zoom scale means.  If you're trying to get zoom it 
doesn't make sense to look at the view matrix.  You need to look at the 
projection matrix.  Also, it doesn't make sense to look at the view matrix to 
get the scale of an object.

 -Original Message-
 From: Cliff Taylor [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, September 18, 2008 6:44 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] how to get model scale?
 
 I think I understand what he means.  I'm going to throw in my 
 2 cents, because I'm interested in the answer to this question.
 
 I'm going to use directions based on a line-of-sight instead 
 of x/y/z to avoid confusing myself or others.
 
 I think what he means is this:
 -- assume the camera at a fixed angle (i.e. 2D view of either 
 a 2D or 3D object) and the user can manually move the camera 
 (via click and drag, perhaps) up/down, left/right, and in/out 
 (this is our zoom).
 The user just cannot turn the camera.
 -- at any given camera position, I would like to know the 
 scale of the zoom.  That is, how much bigger or smaller 
 does the object appear.
 
 I'm sure at some level (OpenGL, hardware), a transform is 
 done using some form of scaling of the original object 
 description. That may, however, be very difficult or 
 impossible to retrieve or use.
 
 From what I see you guys saying, he will just need to do the 
 math on his in/out camera position.  For instance, if the 
 user is half the distance to the object, the zoom scale is 
 now 2 (or 200%).
 Likewise, if the user has moved the camera half the original 
 distance farther away, the scale should be 0.75 (75%).  If 
 the camera moves twice the original distance away, the 
 scale is 0.5 (50%), meaning everything looks half as big 
 (in theory).
 
 Is this correct?  Is there no way to find the scale of the 
 object compared to the original view other than do the math 
 with the distances?
 
 Forgive me if I'm wrong about your question, Forest.  That 
 sounds like what you were asking to me, being a relative 
 newbie to the graphics and scene graph world myself.
 
 2008/9/18 Paul Martz [EMAIL PROTECTED]:
  I'm not entirely sure what you mean by scale of the scene 
 from your 
  message.  To me, this is an application concept. The user sets the 
  scale using some user interface, and the application stores 
 this value 
  and modifies the scene graph to redraw the scene at a 
 different size. 
  If your application were set up this way, you would already 
 have the 
  scale and wouldn't need to retrieve it from OSG.
-Paul
 
 
 
  
 
 From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On 
 Behalf Of forest37
 Sent: Thursday, September 18, 2008 9:22 AM
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] how to get model scale?
 
 
 
  hi all,
 When the secne is zoomed in or out ,I want to 
 get the zoom 
  scale.I do it like this:
 osg::Camera* camera= viewer.getCamera();
 osg::Matrix vm=camera-getViewMatrix();
 osg::Vec3 scale=vm.getScale();
 
 the result is that scale always equals to 
 (1,1,1).What does 
  this mean and how can I get the reall scale of the scene?
 
 thanks
 
 best regards
 
 forest
 
 
 
 
  
 
 [广告] 买房不必东奔西走,上房老大,看二手房网上房展会
  http://popme.163.com/link/003984_0909_8679.html
 
 
  ___
  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-opensce
 negraph.org
 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG 2.6 API Documentation in HTML, HT ML Help and PDF format

2008-09-19 Thread Ernst
David Spilling [EMAIL PROTECTED] writes:

 
 Ernst,Your 1.2 docs have been a permanent shortcut on my desktop for several
years now, so many thanks for doing the same for 2.6!David
 
 
 divdiv dir=ltrErnst,brbrYour 1.2 docs have been a permanent shortcut
on my desktop for several years now, so many thanks for doing the same for
2.6!brbrDavidbrbr
 /div/div
 


Nice to hear!
Ernst


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


[osg-users] setLODScale affecting near far planes?

2008-09-19 Thread Joseanibal Colon Ramos
Hi all,

I am getting this rather weird effect when playing with the setLODScale
values in my application. I have a large pagedLOD terrain, with near/far
planes culling mode enabled for my camera, and I am looking at a certain
direction in the scene. I added osg's lod scale handler so that I can
modify the value interactively (with the * and / keys, just like in
osgviewer) and it turns out that as I change that value, and I dump my
application's debug information, I notice the the near/far planes do not
remain constant, although I am not moving around the scene and I am always
looking in the same direction. This causes problems because the clipping
planes change as a result of changing the LOD scale and my non-LOD objects
beyond the planes get culled.  I don't think that the clipping planes
should change at all if I am not moving my camera. I should still see the
objects that are within a constant near/far distance, and I should only
observe different level of detail on the LOD objects as I change the
scale. What am I missing here?
I am using osg.2.6.0 on a 64bit intel linux machine. Thanks,

-Jose

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


Re: [osg-users] setLODScale affecting near far planes?

2008-09-19 Thread Paul Martz
Do you get the same behavior when viewing your database in osgviewer and
hitting the * and / keys?
   -Paul




 
 Hi all,
 
 I am getting this rather weird effect when playing with the 
 setLODScale values in my application. I have a large pagedLOD 
 terrain, with near/far planes culling mode enabled for my 
 camera, and I am looking at a certain direction in the scene. 
 I added osg's lod scale handler so that I can modify the 
 value interactively (with the * and / keys, just like in
 osgviewer) and it turns out that as I change that value, and 
 I dump my application's debug information, I notice the the 
 near/far planes do not remain constant, although I am not 
 moving around the scene and I am always looking in the same 
 direction. This causes problems because the clipping planes 
 change as a result of changing the LOD scale and my non-LOD 
 objects beyond the planes get culled.  I don't think that the 
 clipping planes should change at all if I am not moving my 
 camera. I should still see the objects that are within a 
 constant near/far distance, and I should only observe 
 different level of detail on the LOD objects as I change the 
 scale. What am I missing here?
 I am using osg.2.6.0 on a 64bit intel linux machine. Thanks,
 
 -Jose
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org

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


[osg-users] shared VertexBufferObject question

2008-09-19 Thread Pecoraro, Alexander N
I want to create a VertexBufferObject that is shared by several Geometry
nodes so that the number of calls to glBindBuffer() are decreased, but I
noticed that on lines 1561 - 1567 of Geometry.cpp there is some code
that automatically unbinds the vertex buffer object effectively forcing
each Geometry node to rebind the VBO each time. Why does it do this?
Isn't this preventing a shared VBO from being used in the most efficient
way possible?

 

Thanks.

 

Alex

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