Re: [osg-users] What are txf and tpf files ?

2009-07-29 Thread Mach Bhai
I tried changing both LOD and Eye point but it didn't work.

As an after thought i opened task manager to monitor the memory consumption of 
osgviewer and then loaded the txp file. There was no increase in memory 
consumption which was a bit disappointing. 

Then i opened another simpler txp and the memory consumption just shot up. 

So i can conclude fairly that the osgviewer is not reading the txp file at all. 

As of now i am looking at other viewers / options mentioned here. And i would 
love to get more nudges in the right direction.

Thank you all.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15575#15575





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


Re: [osg-users] Callback for actors being culled?

2009-07-29 Thread Martin Scheffler
By digging some more I found an old forum message that answers my question, so 
please disregard my request.
http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg16202.html

Cheers, Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15576#15576





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


Re: [osg-users] svn error during checkout

2009-07-29 Thread Jose Luis Hidalgo
Hi S.,

   Months? are you having problems with svn for months? That changes
everything, I'm still having troubles to find out what could be
happening, it's a weird error that could be from Apache, Apr,
Subversion... and there is no much info in the logs. But I'm working
on it.

JL.



On Wed, Jul 29, 2009 at 7:56 AM, S Andreasonsandrea...@gmail.com wrote:
 Hi,
 I am having trouble updating by svn,
 This started a few months ago, but until Flightgear began requiring a newer
 version of osg, I didn't make fixing this a priority.

 I have upgraded svn as reported by --version
 svn, version 1.6.2 (r37639)
  compiled Jul 28 2009, 21:53:53

 and here is the problem, output:

 svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk
 OpenSceneGraph
 A    OpenSceneGraph/include/osgWidget/Widget
 A    OpenSceneGraph/include/osgWidget/Browser
 A    OpenSceneGraph/include/osgWidget/ViewerEventHandlers
 A    OpenSceneGraph/include/osgWidget/VncClient
 A    OpenSceneGraph/include/osgWidget/Version
 A    OpenSceneGraph/include/osgWidget/Table
 svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response body:
 connection was closed by server. (http://www.openscenegraph.org

 After svn sends what is needed, I get EXACTLY 15 seconds (95% of the time, a
 10 second quiet break and another 15 seconds the other 5% of the time) of
 files before it always gives this error.
 I am connected to internet by Modem, and after reading other posts here from
 months ago, I can answer the next question, No, I am not behind a proxy.

 The only thing left that I can think of, is something in my configuration
 before compiling, so here is that long output:

 ./configure --with-apr=/usr/local/apr/bin/apr-config
 --with-apr-util=/usr/local/apr/bin/apu-config
 configure: Configuring Subversion 1.6.2
 configure: creating config.nice
 checking for gcc... gcc
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ISO C89... none needed
 checking for g++... g++
 checking whether we are using the GNU C++ compiler... yes
 checking whether g++ accepts -g... yes
 checking how to run the C preprocessor... gcc -E
 checking build system type... i686-pc-linux-gnu
 checking host system type... i686-pc-linux-gnu
 checking target system type... i686-pc-linux-gnu
 checking for grep that handles long lines and -e... /usr/bin/grep
 checking for egrep... /usr/bin/grep -E
 checking whether ln -s works... yes
 checking for a BSD-compatible install... /usr/local/bin/ginstall -c
 configure: Apache Portable Runtime (APR) library configuration
 checking for APR... yes
 checking APR version... 0.9.13
 configure: Apache Portable Runtime Utility (APRUTIL) library configuration
 checking for APR-util... yes
 checking APR-UTIL version... 0.9.13
 checking for pkg-config... /usr/local/bin/pkg-config
 configure: checking neon library
 checking neon library version... 0.26.2
 checking for ANSI C header files... yes
 checking for sys/types.h... yes
 checking for sys/stat.h... yes
 checking for stdlib.h... yes
 checking for string.h... yes
 checking for memory.h... yes
 checking for strings.h... yes
 checking for inttypes.h... yes
 checking for stdint.h... yes
 checking for unistd.h... yes
 configure: looking for apr_memcache as part of apr-util
 checking apr_memcache.h usability... no
 checking apr_memcache.h presence... no
 checking for apr_memcache.h... no
 checking for Apache module support via DSO through APXS... no
 ==
 WARNING: skipping the build of mod_dav_svn
        try using --with-apxs
 ==
 configure: checking sqlite library
 checking sqlite amalgamation file version... amalgamation found and is okay
 configuring libtool now
 checking for a sed that does not truncate output... /usr/bin/sed
 checking for ld used by gcc... /usr/bin/ld
 checking if the linker (/usr/bin/ld) is GNU ld... yes
 checking for /usr/bin/ld option to reload object files... -r
 checking for BSD-compatible nm... /usr/bin/nm -B
 checking how to recognize dependent libraries... pass_all
 checking dlfcn.h usability... yes
 checking dlfcn.h presence... yes
 checking for dlfcn.h... yes
 checking how to run the C++ preprocessor... g++ -E
 checking for g77... g77
 checking whether we are using the GNU Fortran 77 compiler... yes
 checking whether g77 accepts -g... yes
 checking the maximum length of command line arguments... 98304
 checking command to parse /usr/bin/nm -B output from gcc object... ok
 checking for objdir... .libs
 checking for ar... ar
 checking for ranlib... ranlib
 checking for strip... strip
 checking if gcc supports -fno-rtti 

Re: [osg-users] problems with svn repository

2009-07-29 Thread Ulrich Hertlein

On 28/07/09 8:37 PM, Paul Martz wrote:

Hi JL-- This problem is not limited to TortoiseSVN on Windows. I see the same
thing when I try to svn checkout on OS X.


I didn't have any problems with OS X (update) or Linux (checkout) today or over the last 
few days.


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


Re: [osg-users] svn error during checkout

2009-07-29 Thread Marcus Fritzsch
Hello,

I am having thit same error when trying to use OSG svn through a
corporate proxy.

Just 2 cents of info.

cheers,
Marcus

On Wed, Jul 29, 2009 at 10:08 AM, Jose Luis
Hidalgojoseluis.hida...@gmail.com wrote:
 Hi S.,

   Months? are you having problems with svn for months? That changes
 everything, I'm still having troubles to find out what could be
 happening, it's a weird error that could be from Apache, Apr,
 Subversion... and there is no much info in the logs. But I'm working
 on it.

 JL.



 On Wed, Jul 29, 2009 at 7:56 AM, S Andreasonsandrea...@gmail.com wrote:
 Hi,
 I am having trouble updating by svn,
 This started a few months ago, but until Flightgear began requiring a newer
 version of osg, I didn't make fixing this a priority.

 I have upgraded svn as reported by --version
 svn, version 1.6.2 (r37639)
  compiled Jul 28 2009, 21:53:53

 and here is the problem, output:

 svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk
 OpenSceneGraph
 A    OpenSceneGraph/include/osgWidget/Widget
 A    OpenSceneGraph/include/osgWidget/Browser
 A    OpenSceneGraph/include/osgWidget/ViewerEventHandlers
 A    OpenSceneGraph/include/osgWidget/VncClient
 A    OpenSceneGraph/include/osgWidget/Version
 A    OpenSceneGraph/include/osgWidget/Table
 svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response body:
 connection was closed by server. (http://www.openscenegraph.org

 After svn sends what is needed, I get EXACTLY 15 seconds (95% of the time, a
 10 second quiet break and another 15 seconds the other 5% of the time) of
 files before it always gives this error.
 I am connected to internet by Modem, and after reading other posts here from
 months ago, I can answer the next question, No, I am not behind a proxy.

 The only thing left that I can think of, is something in my configuration
 before compiling, so here is that long output:

 ./configure --with-apr=/usr/local/apr/bin/apr-config
 --with-apr-util=/usr/local/apr/bin/apu-config
 configure: Configuring Subversion 1.6.2
 configure: creating config.nice
 checking for gcc... gcc
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ISO C89... none needed
 checking for g++... g++
 checking whether we are using the GNU C++ compiler... yes
 checking whether g++ accepts -g... yes
 checking how to run the C preprocessor... gcc -E
 checking build system type... i686-pc-linux-gnu
 checking host system type... i686-pc-linux-gnu
 checking target system type... i686-pc-linux-gnu
 checking for grep that handles long lines and -e... /usr/bin/grep
 checking for egrep... /usr/bin/grep -E
 checking whether ln -s works... yes
 checking for a BSD-compatible install... /usr/local/bin/ginstall -c
 configure: Apache Portable Runtime (APR) library configuration
 checking for APR... yes
 checking APR version... 0.9.13
 configure: Apache Portable Runtime Utility (APRUTIL) library configuration
 checking for APR-util... yes
 checking APR-UTIL version... 0.9.13
 checking for pkg-config... /usr/local/bin/pkg-config
 configure: checking neon library
 checking neon library version... 0.26.2
 checking for ANSI C header files... yes
 checking for sys/types.h... yes
 checking for sys/stat.h... yes
 checking for stdlib.h... yes
 checking for string.h... yes
 checking for memory.h... yes
 checking for strings.h... yes
 checking for inttypes.h... yes
 checking for stdint.h... yes
 checking for unistd.h... yes
 configure: looking for apr_memcache as part of apr-util
 checking apr_memcache.h usability... no
 checking apr_memcache.h presence... no
 checking for apr_memcache.h... no
 checking for Apache module support via DSO through APXS... no
 ==
 WARNING: skipping the build of mod_dav_svn
        try using --with-apxs
 ==
 configure: checking sqlite library
 checking sqlite amalgamation file version... amalgamation found and is okay
 configuring libtool now
 checking for a sed that does not truncate output... /usr/bin/sed
 checking for ld used by gcc... /usr/bin/ld
 checking if the linker (/usr/bin/ld) is GNU ld... yes
 checking for /usr/bin/ld option to reload object files... -r
 checking for BSD-compatible nm... /usr/bin/nm -B
 checking how to recognize dependent libraries... pass_all
 checking dlfcn.h usability... yes
 checking dlfcn.h presence... yes
 checking for dlfcn.h... yes
 checking how to run the C++ preprocessor... g++ -E
 checking for g77... g77
 checking whether we are using the GNU Fortran 77 compiler... yes
 checking whether g77 accepts -g... yes
 checking the maximum length of command line arguments... 98304
 

Re: [osg-users] svn error during checkout

2009-07-29 Thread Jose Luis Hidalgo
Hi All,

   Could you try again? I've changed some apache timeouts (there were
too short), and now I can make checkouts with no dropped connections.
TortoiseSVN makes long pauses during the communication with the
server, that's why we have more troubles with it than with other svn
clients.

I hope this is the problem, if you still have this issue report it, please.

Thank you all for you patience,
   JL.


On Wed, Jul 29, 2009 at 10:38 AM, Marcus
Fritzschfrits...@googlemail.com wrote:
 Hello,

 I am having thit same error when trying to use OSG svn through a
 corporate proxy.

 Just 2 cents of info.

 cheers,
 Marcus

 On Wed, Jul 29, 2009 at 10:08 AM, Jose Luis
 Hidalgojoseluis.hida...@gmail.com wrote:
 Hi S.,

   Months? are you having problems with svn for months? That changes
 everything, I'm still having troubles to find out what could be
 happening, it's a weird error that could be from Apache, Apr,
 Subversion... and there is no much info in the logs. But I'm working
 on it.

 JL.



 On Wed, Jul 29, 2009 at 7:56 AM, S Andreasonsandrea...@gmail.com wrote:
 Hi,
 I am having trouble updating by svn,
 This started a few months ago, but until Flightgear began requiring a newer
 version of osg, I didn't make fixing this a priority.

 I have upgraded svn as reported by --version
 svn, version 1.6.2 (r37639)
  compiled Jul 28 2009, 21:53:53

 and here is the problem, output:

 svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk
 OpenSceneGraph
 A    OpenSceneGraph/include/osgWidget/Widget
 A    OpenSceneGraph/include/osgWidget/Browser
 A    OpenSceneGraph/include/osgWidget/ViewerEventHandlers
 A    OpenSceneGraph/include/osgWidget/VncClient
 A    OpenSceneGraph/include/osgWidget/Version
 A    OpenSceneGraph/include/osgWidget/Table
 svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response body:
 connection was closed by server. (http://www.openscenegraph.org

 After svn sends what is needed, I get EXACTLY 15 seconds (95% of the time, a
 10 second quiet break and another 15 seconds the other 5% of the time) of
 files before it always gives this error.
 I am connected to internet by Modem, and after reading other posts here from
 months ago, I can answer the next question, No, I am not behind a proxy.

 The only thing left that I can think of, is something in my configuration
 before compiling, so here is that long output:

 ./configure --with-apr=/usr/local/apr/bin/apr-config
 --with-apr-util=/usr/local/apr/bin/apu-config
 configure: Configuring Subversion 1.6.2
 configure: creating config.nice
 checking for gcc... gcc
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ISO C89... none needed
 checking for g++... g++
 checking whether we are using the GNU C++ compiler... yes
 checking whether g++ accepts -g... yes
 checking how to run the C preprocessor... gcc -E
 checking build system type... i686-pc-linux-gnu
 checking host system type... i686-pc-linux-gnu
 checking target system type... i686-pc-linux-gnu
 checking for grep that handles long lines and -e... /usr/bin/grep
 checking for egrep... /usr/bin/grep -E
 checking whether ln -s works... yes
 checking for a BSD-compatible install... /usr/local/bin/ginstall -c
 configure: Apache Portable Runtime (APR) library configuration
 checking for APR... yes
 checking APR version... 0.9.13
 configure: Apache Portable Runtime Utility (APRUTIL) library configuration
 checking for APR-util... yes
 checking APR-UTIL version... 0.9.13
 checking for pkg-config... /usr/local/bin/pkg-config
 configure: checking neon library
 checking neon library version... 0.26.2
 checking for ANSI C header files... yes
 checking for sys/types.h... yes
 checking for sys/stat.h... yes
 checking for stdlib.h... yes
 checking for string.h... yes
 checking for memory.h... yes
 checking for strings.h... yes
 checking for inttypes.h... yes
 checking for stdint.h... yes
 checking for unistd.h... yes
 configure: looking for apr_memcache as part of apr-util
 checking apr_memcache.h usability... no
 checking apr_memcache.h presence... no
 checking for apr_memcache.h... no
 checking for Apache module support via DSO through APXS... no
 ==
 WARNING: skipping the build of mod_dav_svn
        try using --with-apxs
 ==
 configure: checking sqlite library
 checking sqlite amalgamation file version... amalgamation found and is okay
 configuring libtool now
 checking for a sed that does not truncate output... /usr/bin/sed
 checking for ld used by gcc... /usr/bin/ld
 checking if the linker (/usr/bin/ld) is GNU ld... yes
 checking for 

[osg-users] OSG and WPF Questions

2009-07-29 Thread Martin Fleck
Hello,

I'm new to OSG and WPF (though I've read quite a view tutorials the past 2 
weeks) so I hope I don't ask too many stupid questions :)

Task
I have to program something very similar to a CAD-program. The program should 
be able to load files (stl-files) and you should be able to manipulate the 
model in different ways, selecting triangles, points, cutting, ...
For the visualisation of the models and functionality I chose OSG since it 
seems to offer quite a lot and is pretty fast. (Also it has a reader for 
stl-files ;) )
The UI has to be made with WPF. So basically the OSG-window should be 
controlled via menus, buttons, mouse and keyboard-input.

What I found out
For the past view days I've researched this matter and found only a few 
tutorials on msdn and codeproject. But if I got that right the way to do the 
integration is:
- C++: create a class (OpenGLHwnd) that inherits from HwndHost
- C++: create a window (or a dialog, but dialog didn't work for me) 
- C++: attach the viewer with the window (code taken from this site ... 
.NET-control ...)
- C++: compile the whole thing as managed dll (/clr)
- C#/WPF: use the dll and attach an instance of the class as child in a 
placeholder

In the OpenGLHwnd-class I have to override BuildWindowCore, DestroyWindowCore, 
OnRenderSizeChanged and OnRender.

Status
Well, I just set up the whole thing and tried to make the OpenGL-window fit 
in the WPF-application. In this OpenGL-Window I just try to display two 
pyramids using OSG.

My Problem
If I use normal OpenGL-commands everything is displayed, but if I use the 
viewer, somehow not only the WPF-window is opened, but also an additional 
fullscreen window which shows the pyramids. I don't seem to get the window out 
of the fullscreen mode and fit in the WPF-application.

My Questions
Well, can anyone give me some advise to fix the problem? Or can someone tell me 
if the way I want to integrate OSG in WPF is right, because it seems pretty 
much like a bad workaround to me ^^;
Are there any tutorials on this matter? (I've looked at the osgDotNetDemo from 
hesicong.net, but it doesn't work - applicationcan't be initialized)

I hope everything is understandable since english is not my mother tounge.

Thank you in advance!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15581#15581





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


Re: [osg-users] Serializing / Deserializing an osg::Node to memory pointer

2009-07-29 Thread Andrew Thompson
Hi there,

I finally got around to implementing this functionality (!!) - it works great 
with osg as the target format, but with ive the getReaderWriteForExtension 
call returns null. 

I assume I am missing an environment variable or something and the OSG cannot 
find the correct plugin? For clarification, I have osgdb_ive.dll located at 
C:\OpenSceneGraph\Bin\osgPlugins-2.8.0 and I have the following environment 
variables set (under Windows Vista 32bit)

OSG_FILE_PATH = 
C:\OpenSceneGraph\data;C:\OpenSceneGraph\data\Images;C:\OpenSceneGraph\data\fonts

OSG_ROOT = C:\OpenSceneGraph

OSGHOME = C:\OpenSceneGraph

Path = C:\OpenSceneGraph\bin;C:\OpenSceneGraph\share\OpenSceneGraph\bin\ ...

Thank you!

Andrew

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15582#15582





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


[osg-users] create a image

2009-07-29 Thread Martin Großer

Hello,

I would like create a Image. I read the mail osg Image data in the 
archive of the mailing list. And I try it:



const long size = width*height*3;
unsigned char* data = (unsigned char*)calloc(size, sizeof(unsigned char));

for(long i=0; i  size ; i+= 3)
{
data[i] = 1;//red
data[i+1] = 0;//green
data[i+2] = 0;//blue
}

// image
osg::ref_ptrosg::Image image = new osg::Image;
image-allocateImage(width, height, 1, GL_RGB, GL_UNSIGNED_BYTE);
image-setOrigin(osg::Image::BOTTOM_LEFT);
image-setImage(width, height, 1, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, 
data, osg::Image::NO_DELETE);


osgDB::writeImageFile(*image, /home/.../test.jpg);

But it doesn't work. I get a black image. What is my mistake?


And one more question. GL_UNSIGNED_BYTE means 8 bits per component 
(r,g,b). Right? I would like use 16 bits or more per component. Is it 
possible?


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


Re: [osg-users] create a image

2009-07-29 Thread David Spilling
Martin,

I think you want this:

   data[i] = 255;//red


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


Re: [osg-users] create a image

2009-07-29 Thread Martin Großer

Year! That is right. I feel awful about this mistake.

First I try GL_FLOAT and I forget to change the value from 1 to 255.
Thanks for your help.

Martin

Am 29.07.2009 11:39, schrieb David Spilling:

Martin,

I think you want this:

   data[i] = 255;//red


David


___
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] [3rdparty] osgOcean 1.0 (LGPL) Released

2009-07-29 Thread Peter Clemenko III
I have the latest binary of Cmake, and this is a larger version of the image)

[Image: http://i16.photobucket.com/albums/b15/Th3Flyboy/issue.jpg ]

as far as the dependencies goes, it doesn't even get me that far to ask for 
that

Peter

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15586#15586





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


[osg-users] osg::View::computeIntersections and Shaders

2009-07-29 Thread Harold Comere
Hi all,

I will time to explain my problem clearly this time :)

I use osg::View::computeIntersections to get the picked node.
When a node is picket, i apply a shader effect.
The select effect is done by a class SelectEffect wich inherate of
osgFX::Effect.
To apply the select effect i insert a SelectEffect between the picked node
and its parent.
Then to remove the effect, i delete the SelectEffect and restor initial
parent.

The problem is when i call osg::View::computeIntersections, it do not
intersect nodes with an select effect applied.
If i display the intersected drawable list returned by computeIntersections,
before and after have applied the select effect on the node containing the
picked drawable, the drawable simply disapear from list.

Is there any link between shaders and osg::View::computeIntersections ? I
cant get it from source code.

Thanks for your attention,
Regards,

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


[osg-users] Optimizer changes LOD rangemode

2009-07-29 Thread Fabien Dachicourt

Hi All,
Using osg 2.8, it seems that the optimizer option COMBINE_ADJACENT_LODS 
doesn't take care of LOD rangemode.
LOD children with rangemode PIXEL_SIZE_ON_SCREEN are merged in a LOD 
with rangemode DISTANCE_FROM_EYE_POINT.


Regards,

--

Fabien



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


Re: [osg-users] create a image

2009-07-29 Thread Mourad Boufarguine
Martin,

And for the second question, yes, you can use 16 bits per channel.
GL_UNSIGNED_BYTE means 8 bits per channel, so GL_UNSIGNED_SHORT is for 16
bits.

Mourad

2009/7/29 Martin Großer grosser.mar...@gmx.de

  Year! That is right. I feel awful about this mistake.

 First I try GL_FLOAT and I forget to change the value from 1 to 255.
 Thanks for your help.

 Martin

 Am 29.07.2009 11:39, schrieb David Spilling:

 Martin,

 I think you want this:

 data[i] = 255;//red


 David

 --

 ___
 osg-users mailing 
 listosg-us...@lists.openscenegraph.orghttp://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] create a image

2009-07-29 Thread Martin Großer

Hello Mourad,

ok, I can change it to GL_UNSIGNED_SHORT and I can change the internal 
pixel format to GL_RGB16, but the data value is a pointer to a unsigned 
char.  Unsigned char is also 8 bit and not 16 bit?


Here the changed version:

const long size = width*height*3;
unsigned char* data = (unsigned char*)calloc(size, sizeof(unsigned short));

for(long i=0; i  size ; i+= 3)
{
data[i] =  65535;//red
data[i+1] = 0;//green
data[i+2] = 0;//blue
}

// image
osg::ref_ptrosg::Image image = new osg::Image;
image-allocateImage(width, height, 1, GL_RGB, GL_UNSIGNED_SHORT);
image-setOrigin(osg::Image::BOTTOM_LEFT);
image-setImage(width, height, 1, GL_RGB16, GL_RGB16, GL_UNSIGNED_SHORT, 
data, osg::Image::NO_DELETE);


osgDB::writeImageFile(*image, /home/.../test.jpg);


What type is possible for the data value? And what happens when I use 
GL_FLOAT? There are 32 bits?

My main problem is, I don't understand the data value.


Cheers,

Martin


Am 29.07.2009 13:25, schrieb Mourad Boufarguine:

Martin,

And for the second question, yes, you can use 16 bits per channel. 
GL_UNSIGNED_BYTE means 8 bits per channel, so GL_UNSIGNED_SHORT is for 
16 bits.


Mourad

2009/7/29 Martin Großer grosser.mar...@gmx.de 
mailto:grosser.mar...@gmx.de


Year! That is right. I feel awful about this mistake.

First I try GL_FLOAT and I forget to change the value from 1 to 255.
Thanks for your help.

Martin

Am 29.07.2009 11:39, schrieb David Spilling:

Martin,

I think you want this:

   data[i] = 255;//red


David

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




___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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] Serializing / Deserializing an osg::Node to memory pointer

2009-07-29 Thread Andrew Thompson
To clarify this problem, 

I have checked my environment variables and added the plugins directory to 
PATH, I also was missing zlib1.dll which I have copied to the bin directory. 
Now when I go to the command prompt and type 

osgconv --format ive

it comes back with a ReaderWriter for the IVE format, whereas before it popped 
up an error that zlib was missing. 

However ...

In my code it still fails to load the ReaderWriter for the IVE format. 

///
std::string plugin = 
osgDB::Registry::instance()-createLibraryNameForExtension(ive);

osgDB::Registry::LoadStatus status = 
osgDB::Registry::instance()-loadLibrary(plugin);

// Status comes back as Not Loaded
/

Is there anything I'm missing here? Thanks very much, 
Andrew

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15593#15593





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


Re: [osg-users] OSG and WPF Questions

2009-07-29 Thread Martin Fleck
Hi,

seems like the 5 posts above should be in a new topic ^^;

Addition to my post: I got the osgNETDemo running, but still its WindowsForms 
and not WPF, so I'd still be happy about any advise /help someone could give me 
:)

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15594#15594





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


Re: [osg-users] OSG and WPF Questions

2009-07-29 Thread Can T. Oguz
Hi Martin,

You can capsulate the OSG-stuff in an ActiveX component also. Even though I
don't like COM technology, it may be useful in some cases. Please be careful
about singletons and module globals.

Can

2009/7/29 Martin Fleck eladamri...@hotmail.com

 Hello,

 I'm new to OSG and WPF (though I've read quite a view tutorials the past 2
 weeks) so I hope I don't ask too many stupid questions :)

 Task
 I have to program something very similar to a CAD-program. The program
 should be able to load files (stl-files) and you should be able to
 manipulate the model in different ways, selecting triangles, points,
 cutting, ...
 For the visualisation of the models and functionality I chose OSG since it
 seems to offer quite a lot and is pretty fast. (Also it has a reader for
 stl-files ;) )
 The UI has to be made with WPF. So basically the OSG-window should be
 controlled via menus, buttons, mouse and keyboard-input.

 What I found out
 For the past view days I've researched this matter and found only a few
 tutorials on msdn and codeproject. But if I got that right the way to do the
 integration is:
 - C++: create a class (OpenGLHwnd) that inherits from HwndHost
 - C++: create a window (or a dialog, but dialog didn't work for me)
 - C++: attach the viewer with the window (code taken from this site ...
 .NET-control ...)
 - C++: compile the whole thing as managed dll (/clr)
 - C#/WPF: use the dll and attach an instance of the class as child in a
 placeholder

 In the OpenGLHwnd-class I have to override BuildWindowCore,
 DestroyWindowCore, OnRenderSizeChanged and OnRender.

 Status
 Well, I just set up the whole thing and tried to make the OpenGL-window
 fit in the WPF-application. In this OpenGL-Window I just try to display
 two pyramids using OSG.

 My Problem
 If I use normal OpenGL-commands everything is displayed, but if I use the
 viewer, somehow not only the WPF-window is opened, but also an additional
 fullscreen window which shows the pyramids. I don't seem to get the window
 out of the fullscreen mode and fit in the WPF-application.

 My Questions
 Well, can anyone give me some advise to fix the problem? Or can someone
 tell me if the way I want to integrate OSG in WPF is right, because it seems
 pretty much like a bad workaround to me ^^;
 Are there any tutorials on this matter? (I've looked at the osgDotNetDemo
 from hesicong.net, but it doesn't work - applicationcan't be initialized)

 I hope everything is understandable since english is not my mother tounge.

 Thank you in advance!

 Cheers,
 Martin

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=15581#15581





 ___
 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] OSG and WPF Questions

2009-07-29 Thread Andrew Burnett-Thompson
Hi Martin,

From memory (I've worked with WPF before), each WPF control has at its root
an HWND handle, which is what the osgDotNet demo uses to bind the open scene
graph to the Windows forms control.

So I think if you substitute the HWND handle with the WPF HWND the osgDotNet
stuff should work.

Here - I'm using this (but Windows Forms) to initialise an OpenSceneGraph on
a WinForms user control (which is probably very similar to the osgDotNet
demo)

Try googling WPF HWND Interop and see what you come up with. Apologies if
you have already tried this.

Also I don't know how to stop the other window appearing - that sounds like
an OSG problem and I'm no expert in OSG!!

Cheers,
Andrew

/

void RenderSurfaceView::InitOSG()
{
RECT rect;

// Get the UserControl's Win32 handle
HWND mHwnd=(HWND)this-Handle.ToInt32();

// Get the client area
GetWindowRect(mHwnd, rect);

// Create a WindowData struct from the Win32 Handle
// WindowData is used to pass in the Win32 window handle attached
the GraphicsContext::Traits structure
osg::ref_ptrosg::Referenced windata = new
osgViewer::GraphicsWindowWin32::WindowData(mHwnd);
osg::ref_ptrosg::GraphicsContext::Traits traits = new
osg::GraphicsContext::Traits;

// Now setup the GraphicsContext::Traits by setting width, height, x
position, y position etc...
traits-x = 0;
traits-y = 0;
traits-width = rect.right - rect.left;
traits-height = rect.bottom - rect.top;
traits-windowDecoration = false;
traits-doubleBuffer = true;
traits-sharedContext = 0;
traits-inheritedWindowData = windata;

// We must set the pixelformat before we can create the OSG
Rendering Surface
PIXELFORMATDESCRIPTOR pixelFormat =
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL|PFD_DOUBLEBUFFER,
PFD_TYPE_RGBA,
32,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
24,
0,
0,
PFD_MAIN_PLANE,
0,
0, 0, 0
};

// Get the device context for the Win32 handle to the control
HDC hdc = ::GetDC(mHwnd);
if (hdc==0)
{
::DestroyWindow(mHwnd);
return ;
}

// Set the pixel format on the device context
int pixelFormatIndex = ::ChoosePixelFormat(hdc, pixelFormat);
if (pixelFormatIndex==0)
{
::ReleaseDC(mHwnd, hdc);
::DestroyWindow(mHwnd);
return ;
}

if (!::SetPixelFormat(hdc, pixelFormatIndex, pixelFormat))
{
::ReleaseDC(mHwnd, hdc);
::DestroyWindow(mHwnd);
return ;
}

// Create an Open Scene Graph graphics context
osg::ref_ptrosg::GraphicsContext gc =
osg::GraphicsContext::createGraphicsContext(traits);

// Create an Open Scene Graph camera
this-camera = new osg::Camera;

osg::CullSettings::CullingMode cullMode =
osg::CullSettings::ENABLE_ALL_CULLING;

// Force all culling on
camera-setCullingMode(cullMode);

// Set the graphics context on the camera and the viewport
camera-setGraphicsContext(gc);
camera-setViewport(new
osg::Viewport(0,0,traits-width,traits-height));
camera-setDrawBuffer(GL_BACK);
camera-setReadBuffer(GL_BACK);

// Finally, create an osgViewer instance and add the camera to it
this-osgViewer = new osgViewer::Viewer();

osgViewer-getCamera()-setClearColor(osg::Vec4(0.8,0.8,0.8,1));
osgViewer-addSlave(camera);

   // ..


// Run the Open Scene Graph thread
RunOSG();

// And set the Is Initialised flag
this-osgInitialised = true;
}

/

On Wed, Jul 29, 2009 at 1:50 PM, Martin Fleck eladamri...@hotmail.comwrote:

 Hi,

 seems like the 5 posts above should be in a new topic ^^;

 Addition to my post: I got the osgNETDemo running, but still its
 WindowsForms and not WPF, so I'd still be happy about any advise /help
 someone could give me :)

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=15594#15594





 ___
 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] OSG and WPF Questions

2009-07-29 Thread Sergey Kurdakov
Hi All.

the following link might be of some help

http://www.codeproject.com/KB/WPF/WPFOpenGL.aspx

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


Re: [osg-users] MDI application with osgViewer::Viewer on dual monitors

2009-07-29 Thread Jean-Sébastien Guay

Hi Jeff,

I can't help you with your C++/CLI MDI issues, but this one I can answer.


On another topic, I recently downloaded some OSG2.8.1 dlls and the dll
names are all prefixed with osg55-.  What's that all about?


This was done around OSG 2.2-time, in order to avoid DLL hell. It 
effectively versions DLLs (it's like the SO version in Linux/Unix .so 
shared libraries, but there it's embedded in the file, whereas on 
Windows we have to use a prefix to the file name).


In essence, whenever an app tries to load an OSG DLL, it will use a 
filename like osgXX-libraryname.dll, and that ensures that it loads 
the right version of the DLL. Previously, if you had multiple versions 
of OSG DLLs on your path, you could get into situations where the wrong 
version was loaded at runtime which resulted in crashes.


And since the DLL filename to load is embedded in the import library 
that your app links to (.lib), the filename doesn't make any difference 
to the user/developer. In short, it fixes potential problems, but 
doesn't cause any additional ones.


Hope that clears things up,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] osgOcean 1.0 (LGPL) Released

2009-07-29 Thread Jean-Sébastien Guay

Hi Peter,


as far as the dependencies goes, it doesn't even get me that far to ask for 
that


Don't show the advanced options, that's just noise and doesn't relate to 
your current problem.


If you just check what values it gives for the OSG libraries, and if 
they're not right fix them manually, then click Configure again, what do 
you get?


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] create a image

2009-07-29 Thread Jean-Sébastien Guay

Hello Martin,

This is totally unrelated to your question: Please don't reply to an 
existing message when you want to start a new thread of discussion. 
Please start a new message instead. If you don't want to type the 
mailing list address (as I suspect that's the main reason people keep 
doing this), use an address book.


For those of us using threaded mail readers, what you did makes it look 
like your message was a reply to the other thread (OSG and WPF 
Questions). And it seems that on the forum, the same thing happened 
(your message wound up in the other thread). See:


http://forum.openscenegraph.org/viewtopic.php?p=15581

That means that less people will be likely to see your question since 
they may not be reading all threads.


Thanks,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG and WPF Questions

2009-07-29 Thread Martin Fleck
Hello everyone, thank you for your replies :)

@Sergey: Thank you but I've tried exactly that, but the problem is that I want 
to integrate the window in the WPF-application and not open another window :(

@Andrew: If I'm not wrong WPF uses only one HWND for the whole application. I 
guess that is where the problem lies, maybe I mix up my handlers. Anyway thank 
you for the code, maybe another way is to create a winforms-control and embed 
it into WPF (though it seems very strange OSG-Winforms-WPF).

@Can: OK, I've never worked with ActiveX before so I'm not sure what you're 
talking about, but I'll research it, thanks.

Again, thank you all, it's great that there are people here willing to help 
(and so fast :D)

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15602#15602





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


Re: [osg-users] OSG and WPF Questions

2009-07-29 Thread Can T. Oguz
Hi Again,

Please check out osgActiveX. You'll see that viewer is capsulated as an MFC
ActiveX control.

Regards,

Can

2009/7/29 Martin Fleck eladamri...@hotmail.com

 Hello everyone, thank you for your replies :)

 @Sergey: Thank you but I've tried exactly that, but the problem is that I
 want to integrate the window in the WPF-application and not open another
 window :(

 @Andrew: If I'm not wrong WPF uses only one HWND for the whole application.
 I guess that is where the problem lies, maybe I mix up my handlers. Anyway
 thank you for the code, maybe another way is to create a winforms-control
 and embed it into WPF (though it seems very strange OSG-Winforms-WPF).

 @Can: OK, I've never worked with ActiveX before so I'm not sure what you're
 talking about, but I'll research it, thanks.

 Again, thank you all, it's great that there are people here willing to help
 (and so fast :D)

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=15602#15602





 ___
 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] svn error during checkout

2009-07-29 Thread S Andreason

Hi Jose,
   Months? are you having problems with svn for months? 


Yes, in differing messages.


That changes
everything, I'm still having troubles to find out what could be
happening, it's a weird error that could be from Apache, Apr,
Subversion... and there is no much info in the logs. But I'm working
on it.

  
Since I resumed trying to update my local copy, (last successful build 
was Jan.29. I know it worked then.)
I started taking notes on Jul.17 when running svn-1.4.6 and the error 
was different for the *update:*

svn: REPORT request failed on '/svn/osg/!svn/vcc/default'
svn: REPORT of '/svn/osg/!svn/vcc/default': Chunk delimiter was invalid 
(http://

www.openscenegraph.org)

So I started trying a fresh *checkout* the next day, but that had this 
same error I am reporting.



svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response body:
connection was closed by server. (http://www.openscenegraph.org



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


Re: [osg-users] create a image

2009-07-29 Thread Mourad Boufarguine
Rather I would do this :

const long size = width*height*3;
unsigned short* data = (unsigned short*)calloc(size, sizeof(unsigned
short));

for(long i=0; i  size ; i+= 3)
{
data[i] =  65535;//red
data[i+1] = 0;//green
data[i+2] = 0;//blue
}

// image
osg::ref_ptrosg::Image image = new osg::Image;
image-allocateImage(width, height, 1, GL_RGB, GL_UNSIGNED_SHORT);
image-setOrigin(osg::Image::BOTTOM_LEFT);
image-setImage(width, height, 1, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT,
(unsigned char*)data, osg::Image::NO_DELETE);

osgDB::writeImageFile(*image, */home/*.../test.jpg);


Mourad


2009/7/29 Martin Großer grosser.mar...@gmx.de

  Hello Mourad,

 ok, I can change it to GL_UNSIGNED_SHORT and I can change the internal
 pixel format to GL_RGB16, but the data value is a pointer to a unsigned
 char.  Unsigned char is also 8 bit and not 16 bit?

 Here the changed version:

 const long size = width*height*3;
 unsigned char* data = (unsigned char*)calloc(size, sizeof(unsigned short));


 for(long i=0; i  size ; i+= 3)
 {
 data[i] =  65535;//red
 data[i+1] = 0;//green
 data[i+2] = 0;//blue
 }

 // image
 osg::ref_ptrosg::Image image = new osg::Image;
 image-allocateImage(width, height, 1, GL_RGB, GL_UNSIGNED_SHORT);
 image-setOrigin(osg::Image::BOTTOM_LEFT);
 image-setImage(width, height, 1, GL_RGB16, GL_RGB16, GL_UNSIGNED_SHORT,
 data, osg::Image::NO_DELETE);

 osgDB::writeImageFile(*image, */home/*.../test.jpg);


 What type is possible for the data value? And what happens when I use
 GL_FLOAT? There are 32 bits?
 My main problem is, I don't understand the data value.


 Cheers,

 Martin


 Am 29.07.2009 13:25, schrieb Mourad Boufarguine:

 Martin,

 And for the second question, yes, you can use 16 bits per channel.
 GL_UNSIGNED_BYTE means 8 bits per channel, so GL_UNSIGNED_SHORT is for 16
 bits.

 Mourad

 2009/7/29 Martin Großer grosser.mar...@gmx.de

  Year! That is right. I feel awful about this mistake.

 First I try GL_FLOAT and I forget to change the value from 1 to 255.
 Thanks for your help.

 Martin

 Am 29.07.2009 11:39, schrieb David Spilling:

  Martin,

 I think you want this:

 data[i] = 255;//red


 David

 --

 ___
 osg-users mailing 
 listosg-us...@lists.openscenegraph.orghttp://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 
 listosg-us...@lists.openscenegraph.orghttp://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] svn error during checkout

2009-07-29 Thread S Andreason

Jose Luis Hidalgo wrote:

   Could you try again? I've changed some apache timeouts (there were
too short), and now I can make checkouts with no dropped connections.
  


It goes longer until the error, 45 seconds, 100 seconds the last time I 
stared at it counting... This time as I write this, it has gone, oops, 
there it stopped at about  3 minutes.


svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response 
body: connection was closed by server. (http://www.openscenegraph.org)


Stewart

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


[osg-users] create a image

2009-07-29 Thread Martin Großer

Hello,

I have make a new message, because I replied another message and it was 
not so good. I hope this is ok.


Ok, back to my problem.
Mourad thanks for your help. I try it and it seems that I lose the half 
image information. When I have a image 12 x 12 I get a image 6x6. I 
think the problem is that the unsigned char* can only handle 8 bits.


Cheers,

Martin


Am 29.07.2009 15:58, schrieb Mourad Boufarguine:

Rather I would do this :

const long size = width*height*3;
unsigned short* data = (unsigned short*)calloc(size, sizeof(unsigned 
short));


for(long i=0; i  size ; i+= 3)
{
data[i] =  65535;//red
data[i+1] = 0;//green
data[i+2] = 0;//blue
}

// image
osg::ref_ptrosg::Image image = new osg::Image;
image-allocateImage(width, height, 1, GL_RGB, GL_UNSIGNED_SHORT);
image-setOrigin(osg::Image::BOTTOM_LEFT);
image-setImage(width, height, 1, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT, 
(unsigned char*)data, osg::Image::NO_DELETE);


osgDB::writeImageFile(*image, //home//.../test.jpg);


Mourad


2009/7/29 Martin Großer grosser.mar...@gmx.de 
mailto:grosser.mar...@gmx.de


Hello Mourad,

ok, I can change it to GL_UNSIGNED_SHORT and I can change the
internal pixel format to GL_RGB16, but the data value is a pointer
to a unsigned char.  Unsigned char is also 8 bit and not 16 bit?

Here the changed version:


const long size = width*height*3;
unsigned char* data = (unsigned char*)calloc(size, sizeof(unsigned
short));

for(long i=0; i  size ; i+= 3)
{
data[i] =  65535;//red
data[i+1] = 0;//green
data[i+2] = 0;//blue
}

// image
osg::ref_ptrosg::Image image = new osg::Image;
image-allocateImage(width, height, 1, GL_RGB, GL_UNSIGNED_SHORT);
image-setOrigin(osg::Image::BOTTOM_LEFT);
image-setImage(width, height, 1, GL_RGB16, GL_RGB16,
GL_UNSIGNED_SHORT, data, osg::Image::NO_DELETE);

osgDB::writeImageFile(*image, //home//.../test.jpg);


What type is possible for the data value? And what happens when I
use GL_FLOAT? There are 32 bits?
My main problem is, I don't understand the data value.


Cheers,

Martin


Am 29.07.2009 13:25, schrieb Mourad Boufarguine:

Martin,

And for the second question, yes, you can use 16 bits per
channel. GL_UNSIGNED_BYTE means 8 bits per channel, so
GL_UNSIGNED_SHORT is for 16 bits.

Mourad

2009/7/29 Martin Großer grosser.mar...@gmx.de
mailto:grosser.mar...@gmx.de

Year! That is right. I feel awful about this mistake.

First I try GL_FLOAT and I forget to change the value from 1
to 255.
Thanks for your help.

Martin

Am 29.07.2009 11:39, schrieb David Spilling:

Martin,

I think you want this:

   data[i] = 255;//red


David

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

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




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

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




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



___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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] create a image

2009-07-29 Thread Jason Daly

Martin Großer wrote:

Hello,

I have make a new message, because I replied another message and it 
was not so good. I hope this is ok.


Ok, back to my problem.
Mourad thanks for your help. I try it and it seems that I lose the 
half image information. When I have a image 12 x 12 I get a image 6x6. 
I think the problem is that the unsigned char* can only handle 8 bits.


That's not the problem.  If that were the problem, there would have to 
be a dozen or more versions of setImage() to handle all the different 
formats.


Try changing your setImage() call to this:

image-setImage(width, height, 1, GL_RGB16, GL_RGB, GL_UNSIGNED_SHORT, 
(unsigned char*)data, osg::Image::NO_DELETE);


--J

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


[osg-users] Simple way to determine if a point is inside a geometry

2009-07-29 Thread Andrew Thompson
Hi there, 

Given a single object in my scene graph defined by the hierachy

PositionAttitudeTransform (x1)
   |
Geode (x1)
   |
Geometry (x1)
   |
Drawables (x Many)

Is there a simple way to determine if a point location is inside the geometry, 
taking into account transforms applied by the PAT?

I am reluctant to use the intersect visitor, as the scene is very cluttered and 
I will likely get lots of intersections, and this may be time-consuming to 
determine whether the intersection was with my geometry object. 

Any ideas?

Thank you!

Andrew

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15610#15610





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


[osg-users] Deadlock when loading osg.dll, singletons are evil

2009-07-29 Thread Tanguy Fautre
Hi,

We've encountered several times a random deadlock that would happen when
starting our application. After some playing around, we've identified
the problem to be quite a subtle one.

Here is what's happening. When osg.dll (in our case the full name is
osg59-osgd.dll) gets loaded, it initializes several singletons directly
and indirectly. These initializations lead to a call to
DisplaySettings::readEnvironmentalVariables(), which in turn calls
getenv().

All would be fine if it weren't for two subtle details:

1. The singleton initializations are indirectly called from DllMain().
Unfortunately, DllMain() is fairly limited in what you can do in it. For
example, calling synchronization primitives is usually a very bad idea.

2. getenv() calls a lock (a synchronization primitive) on the
environment.

The result of combining these two points is as given in the title of
this post: a nice random deadlock.

More about DllMain:
http://msdn.microsoft.com/en-us/library/ms682583%28VS.85%29.aspx
http://msdn.microsoft.com/en-us/library/aa290048%28VS.71%29.aspx#vcconmi
xeddllloadingproblemanchor3



A few months ago, there was a heated discussion about singletons in
OpenSceneGraph. Since then, this issue as well as others have now
convinced me that singletons are not simply a bad practice, but are
actually completely broken (i.e. they do not work).

Singletons are generally considered to be an anti-pattern due to the
hidden dependencies they introduce. Google is full of papers on this,
and I can attest from our personal experience with OSG that this has
been a problem on numerous occasions. For example, to improved resource
usage, we have to keep the screengraph alive but destroy the OpenGL
context when it's not being rendered. This proved to be an extremely
difficult endeavour as we had to track all these hidden dependencies by
trial and error, and manually reset them one by one.

The aforementioned deadlock however leads me to the conclusion that
singletons are not just an anti-pattern but are completely broken.
Because of the DllMain() limitations, any C/C++ standard function is
potentially unsafe. Therefore, any singleton using a C/C++ standard
function is itself potentially unsafe if used in a DLL. All it takes is
for one of these standard functions implementation to call a
synchronization primitive that is illegal in DllMain().



Regards,

Tanguy


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


Re: [osg-users] [vpb] Can I use VPB/OSG to smooth the edges of different res images??

2009-07-29 Thread Chris 'Xenon' Hanson
Colin Knowles wrote:
 Hi,
 I have a large hi res globe which I've built showing 250 odd kms of river 
 with 30cm resolution terrain and 20cm imagery - I've been asked to mod the 
 texture so that it shows an increase in the level of the river.
 For small areas I typically create a contour polygon at the new water 
 elevation and use that as a line which is baked onto the image in a 3rd party 
 software package , this is then used in photoshop as a reference line which I 
 can create a false texture fill inside. 
 This process works great for small areas , unfortunately for 80 gigs of 
 imagery I cannot manually go through each tile and photoshop a new texture 
 for the river edge in the time allowed. 
 I can create a georeferenced image of the new river on it's own at a higher 
 resolution than the base image and build the globe - but then I end up with a 
 hard edge between the base image and the new river texture - is it possible 
 to use the osg to feather the edge of the higher res image into the existing 
 image so that there is a smoothed edge??
 I can post up some images to give you an idea of what I'm getting at if this 
 helps.

  I don't believe you can do this with current VPB.

  It's something you could do in my Visual Nature Studio software (
http://3dnature.com/vnsinfo.html ), but even there, 80gigs is too large for VNS 
to process.

 Cheers,
 Colin
 www.k2vi.com

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
There is no Truth. There is only Perception. To Perceive is to Exist. - Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Deadlock when loading osg.dll, singletons are evil

2009-07-29 Thread Jean-Sébastien Guay

Hi Tanguy,


We've encountered several times a random deadlock that would happen when
starting our application. After some playing around, we've identified
the problem to be quite a subtle one.


What you're describing makes sense in some way, but I have two questions:

1. Why have there not been more discussions about random deadlocks in 
the recent past? For example, we have not experienced anything 
resembling what you describe. I am not an expert in Win32 programming, 
so what you describe may well be true, but we haven't encountered this, 
and I'm pretty sure if it were such a widespread problem we'd have heard 
of it on this list before. Of course, that's not proof in itself that 
the issue is not there, but it's an indication that it might be 
something on your side rather than a widespread problem.


2. If singletons are bad practice as you say, what do you propose to 
replace them? I'm always a bit skeptical of sentences like Google is 
full of papers [saying that singletons are broken]. People have a 
tendency to be extreme in their judgements, and if someone finds an 
instance where singletons give bad results, they will often start saying 
that they are bad in all cases (and inevitably post to their blog about 
it). It's a tool for a job, and the developer has to know when to use it 
and when not to. That's the developer's responsibility, not the tool's.


I'm not saying that all uses of singletons in OSG are good ones (most 
obviously because I've probably not personally seen all of them) but 
singletons are useful (they give a single point of access to something - 
data, functionality) and that has to be replaced by something else if 
singletons have a downside in some/most/all(?) situations.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] svn error during checkout

2009-07-29 Thread S Andreason



   Could you try again? I've changed some apache timeouts (there were
too short), and now I can make checkouts with no dropped connections.
  
It goes longer until the error, 45 seconds, 100 seconds the last time 
I stared at it counting... This time as I write this, it has gone, 
oops, there it stopped at about  3 minutes.


Hi,

I have reached an impasse.
Perhaps the file next in line, is larger than the time it takes to
error? I can go no farther.
52 of 77Mb retrieved. (or it Was 77Mb in January)

It gets data for a variable length of time, usually has a 10 second
break of inactivity, gets more data, then crashes.
The times below are not perfect, depending on how long it takes me to
notice it stopped. (usually about 10 seconds)

Jul-29 7:43:06 [1[pts/7:21]sandreas /1src/SVN svn checkout
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
AOpenSceneGraph/src/osgTerrain/GeometryTechnique.cpp
AOpenSceneGraph/src/osgTerrain/TerrainTile.cpp
AOpenSceneGraph/src/osgTerrain/Locator.cpp
AOpenSceneGraph/src/osgTerrain/Terrain.cpp
AOpenSceneGraph/src/osgTerrain/Version.cpp
AOpenSceneGraph/src/osgTerrain/TerrainTechnique.cpp
AOpenSceneGraph/src/osgTerrain/CMakeLists.txt
AOpenSceneGraph/src/osgTerrain/Layer.cpp
AOpenSceneGraph/src/CMakeLists.txt
AOpenSceneGraph/CTestConfig.cmake
svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response
body: connection was closed by server. (http://www.openscenegraph.org)
Jul-29 7:44:08 [1[pts/7:22]sandreas /usr/src/SVN svn checkout
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response
body: connection was closed by server. (http://www.openscenegraph.org)
Jul-29 7:45:09 [1[pts/7:23]sandreas /usr/src/SVN svn checkout
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response
body: connection was closed by server. (http://www.openscenegraph.org)
Jul-29 7:47:41 [1[pts/7:24]sandreas /usr/src/SVN svn checkout
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response
body: connection was closed by server. (http://www.openscenegraph.org)
Jul-29 7:48:40 [1[pts/7:25]sandreas /usr/src/SVN svn checkout
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response
body: connection was closed by server. (http://www.openscenegraph.org)
Jul-29 7:50:22 [1[pts/7:26]sandreas /usr/src/SVN svn checkout
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response
body: connection was closed by server. (http://www.openscenegraph.org)
Jul-29 7:51:30 [1[pts/7:27]sandreas /usr/src/SVN


Also, I noticed apr-util depended on db-4.0, but subversion wasn't happy 
with that, so I upgraded to db-4.7 and apr-1.3.7 which removed a couple 
warnings.

Alas, still same error.

 svn checkout 
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response 
body: connection was closed by server. (http://www.openscenegraph.org)

Jul-29 10:18:18 [1[pts/6:69]sandreas /usr/src/SVN

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


Re: [osg-users] Deadlock when loading osg.dll, singletons are evil

2009-07-29 Thread Tanguy Fautre
Hi J-S,

Your questions are quite legitimate. I'll try to answer them to my best 
knowledge.

1.

The DllMain problem is quite well documented (cf. the MSDN links from my 
previous post). The thing is that an illegal use of DllMain is quite similar to 
a race condition. Most of the time, everything just seems to work. Our 
application has already about 10 threads up and running before osg.dll is being 
loaded, significantly increasing the chance of a deadlock. I would expect most 
OSG-based applications to do just fine as they start using OSG (and therefore 
osg.dll) when still single threaded.

Because our application is quite multithreaded, it's not the first time we've 
uncovered thread-safety bugs in what are supposed to be quite stable libraries. 
Recently, we've just found a couple of thread-safety issues with LibCurl and 
OpenSSL (their developers have accepted these as genuine defects and are fixing 
these issues). Google found a few (not many) posts related to these issues, but 
due to the lack of proper investigations they often got dismissed.

2.

Just going to http://en.wikipedia.org/wiki/Singleton_pattern you'll see that 
the first paragraph has already 6 anti-singleton references.

A few other references I have at hand include:
http://accu.org/index.php/journals/337
http://code.google.com/p/google-singleton-detector/wiki/WhySingletonsAreControversial
http://blogs.msdn.com/scottdensmore/archive/2004/05/25/140827.aspx

How can you replace singletons?

If one still insists on using singletons, the first thing one can do to 
alleviate the problem is to provide init/destroy functions (note that they have 
to be thread-safe, re-entrant, and should be able to cope with multiple 
initializations). For example: initOsg() and destroyOsg() (or better: an object 
that calls init in its constructor and destroy in its destructor). These two 
functions control the lifetime of the whole library. This is a common approach, 
and for good reasons. Because you give the user control on the lifetime of the 
library, it effectively resolves the DllMain problem.

A better way is not to use singletons at all. Just provide explicitly exposed 
objects and classes. The benefit is that you get rid of any hidden dependency. 
It also gives even more control to the user as far as the objects (and thus the 
library) lifetime is concerned.


A lot of people (myself included) find singletons convenient because they do 
hide implicit dependency, which results in less code to be written. 
Unfortunately, I'm starting to think that it's a bad decision in most (all?) 
cases, especially in a library that is going to be used by others. As they 
force the user to give up lifetime control and dependency control, singletons 
just don't go well with some of C++ most common idioms (e.g. RAII).

Furthermore, singletons tend to be a fuzzy concept. It states that you have a 
single instance of an object, but it does not state per what. With a naive 
static Object approach, you can end up having several singletons per thread 
(e.g. thread local storage), several singletons per process (one per DLL/EXE), 
and of course several singletons per applications (if there are several 
processes). Stretch it even more and imagine you're working on a distributed 
system. It's not uncommon to have several singletons when you're only supposed 
to have one (and it's very easy to fail to see this).


Cheers,

Tanguy


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien 
Guay
Sent: 29 July 2009 17:28
To: OpenSceneGraph Users
Subject: Re: [osg-users] Deadlock when loading osg.dll, singletons are evil

Hi Tanguy,

 We've encountered several times a random deadlock that would happen when
 starting our application. After some playing around, we've identified
 the problem to be quite a subtle one.

What you're describing makes sense in some way, but I have two questions:

1. Why have there not been more discussions about random deadlocks in 
the recent past? For example, we have not experienced anything 
resembling what you describe. I am not an expert in Win32 programming, 
so what you describe may well be true, but we haven't encountered this, 
and I'm pretty sure if it were such a widespread problem we'd have heard 
of it on this list before. Of course, that's not proof in itself that 
the issue is not there, but it's an indication that it might be 
something on your side rather than a widespread problem.

2. If singletons are bad practice as you say, what do you propose to 
replace them? I'm always a bit skeptical of sentences like Google is 
full of papers [saying that singletons are broken]. People have a 
tendency to be extreme in their judgements, and if someone finds an 
instance where singletons give bad results, they will often start saying 
that they are bad in all cases (and inevitably post to their blog about 
it). It's a tool for a job, and the 

Re: [osg-users] [vpb] Can I use VPB/OSG to smooth the edges of different res images??

2009-07-29 Thread Colin Knowles
Hi Chris,
Thanks for the offer , currently I use global mapper to crunch raster 
everything - and love it. But I dont have the $$ right now to buy the latest 64 
bit version they have released (spent a small fortune on a new I7 to build 
globes quickly instead) 
I'll keep hunting around.

Cheers,
Colin


www.k2vi.com

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15617#15617





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


Re: [osg-users] Simple way to determine if a point is inside a geometry

2009-07-29 Thread Tomlinson, Gordon
One way might be something along the lines of


1) use the boudingspehere of  PAT to see if you point is with in the
bounding sphere  if its not then stop/bail ( you will have to transform
the sphere by the pat transforms etc)

2) Iterate over each drawables boundling box ( transfromed by applying
the Pat matrix ) and test the  to see, if the point is inside the
bounding box, do what you need to do

3) get to this point , your not inside so bail

You could also trnasform the point into the PATs reference frame as well

There are helper functions/methods for these tests etc.


Gordon
Product Manager 3d
__
Gordon Tomlinson
Email  : gtomlinson @ overwatch.textron.com
__


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Andrew
Thompson
Sent: Wednesday, July 29, 2009 11:54 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Simple way to determine if a point is inside a
geometry

Hi there, 

Given a single object in my scene graph defined by the hierachy

PositionAttitudeTransform (x1)
   |
Geode (x1)
   |
Geometry (x1)
   |
Drawables (x Many)

Is there a simple way to determine if a point location is inside the
geometry, taking into account transforms applied by the PAT?

I am reluctant to use the intersect visitor, as the scene is very
cluttered and I will likely get lots of intersections, and this may be
time-consuming to determine whether the intersection was with my
geometry object. 

Any ideas?

Thank you!

Andrew

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15610#15610





___
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


Re: [osg-users] Deadlock when loading osg.dll, singletons are evil

2009-07-29 Thread Thrall, Bryan
Tanguy Fautre wrote on Wednesday, July 29, 2009 12:37 PM:
 The DllMain problem is quite well documented (cf. the MSDN links from my
 previous post). The thing is that an illegal use of DllMain is quite similar
 to a race condition. Most of the time, everything just seems to work. Our
 application has already about 10 threads up and running before osg.dll is
 being loaded, significantly increasing the chance of a deadlock. I would
 expect most OSG-based applications to do just fine as they start using OSG
 (and therefore osg.dll) when still single threaded.  
 
 Because our application is quite multithreaded, it's not the first time we've
 uncovered thread-safety bugs in what are supposed to be quite stable
 libraries. Recently, we've just found a couple of thread-safety issues with
 LibCurl and OpenSSL (their developers have accepted these as genuine defects
 and are fixing these issues). Google found a few (not many) posts related to
 these issues, but due to the lack of proper investigations they often got
 dismissed.  

The links you posted explicitly said that creating synchronization primitives 
is allowed in DllMain; the problem is acquiring them when other threads are 
trying to acquire the loader lock (to enter some DllMain function). Are you 
saying that the problem is the mutex used in creating the singletons, or is 
there some other limitation of DllMain that you think OSG is violating?

A simple test case demonstrating the problem you're describing would be 
helpful, I think.

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
 Jean-Sébastien Guay  
 Sent: 29 July 2009 17:28
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Deadlock when loading osg.dll, singletons are evil
 
 Hi Tanguy,
 
 We've encountered several times a random deadlock that would happen when
 starting our application. After some playing around, we've identified
 the problem to be quite a subtle one.
 
 What you're describing makes sense in some way, but I have two questions:
 
 1. Why have there not been more discussions about random deadlocks in
 the recent past? For example, we have not experienced anything
 resembling what you describe. I am not an expert in Win32 programming,
 so what you describe may well be true, but we haven't encountered this,
 and I'm pretty sure if it were such a widespread problem we'd have heard
 of it on this list before. Of course, that's not proof in itself that
 the issue is not there, but it's an indication that it might be
 something on your side rather than a widespread problem.
 
 2. If singletons are bad practice as you say, what do you propose to
 replace them? I'm always a bit skeptical of sentences like Google is
 full of papers [saying that singletons are broken]. People have a
 tendency to be extreme in their judgements, and if someone finds an
 instance where singletons give bad results, they will often start saying
 that they are bad in all cases (and inevitably post to their blog about
 it). It's a tool for a job, and the developer has to know when to use it
 and when not to. That's the developer's responsibility, not the tool's.
 
 I'm not saying that all uses of singletons in OSG are good ones (most
 obviously because I've probably not personally seen all of them) but
 singletons are useful (they give a single point of access to something -
 data, functionality) and that has to be replaced by something else if
 singletons have a downside in some/most/all(?) situations.
 
 J-S



-- 
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] A noob question: Can OSG do this?

2009-07-29 Thread Michael Angelkovich
Hello,

I've made an OpenGL application of considerable size and now I am exploring 
possibilities to display its results on a stereoscopic wall. Particularly, I 
will be let to try this on a VR system that is in possession of Technical 
University Sofia, in Bulgaria.

As the machine they use a cluster, where the master PC is connected to two 
rendering slaves. Slaves project the stereoscopic image to the wall with two 
beamers.

Right now I cannot say more about this cluster, but I hope you could still tell 
me if it should be possible to control this cluster through OSG. I would also 
appreciate tips on how to get started, since I have no previous experience with 
OSG. :) Today I had look at few pieces of code.

Thank you in advance for taking interest in this topic. :)


++

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15611#15611





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


Re: [osg-users] [osgPlugins] Collada plugin texture problem

2009-07-29 Thread Michele Olsen
Hello,

I am having a similar problem of the textures not appearing when I upgraded to 
osg 2.8.2.
I tried looking at the files but I was unable to find the line you said to 
modify. I used the Collada Next Gen exporter in 3D Studio Max 2008 to export my 
models. The specific line I get when loading the models into my scene is 
Failed to find matching bind_vertex_input for CHANNEL1

Thanks for your help,

Michele

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15620#15620





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


[osg-users] Draw time vs. GPU time Stats question

2009-07-29 Thread Pecoraro, Alexander N
Is it fair to say that the Draw time in the OSG stats measures the time needed 
to sort and call the display lists of the Geometry nodes obtained by the Cull 
stage and make the other frame rendering related OpenGL calls? And GPU time is 
the time that the GPU spends rendering the geometry (vertices, textures, etc)?

Thanks.

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


Re: [osg-users] A noob question: Can OSG do this?

2009-07-29 Thread Jason Daly

Michael Angelkovich wrote:

Hello,

I've made an OpenGL application of considerable size and now I am exploring 
possibilities to display its results on a stereoscopic wall. Particularly, I 
will be let to try this on a VR system that is in possession of Technical 
University Sofia, in Bulgaria.

As the machine they use a cluster, where the master PC is connected to two 
rendering slaves. Slaves project the stereoscopic image to the wall with two 
beamers.

Right now I cannot say more about this cluster, but I hope you could still tell 
me if it should be possible to control this cluster through OSG. I would also 
appreciate tips on how to get started, since I have no previous experience with 
OSG. :) Today I had look at few pieces of code.

Thank you in advance for taking interest in this topic. :)
  


Hi, Michael,

OSG has certainly been used for cluster rendering, but it doesn't have 
any specific features explicitly designed for cluster rendering.  Take a 
look at the osgcluster example to get an idea of how you might approach it.


The other thing you mentioned is that you already have a sizable OpenGL 
application that you want to run on the cluster.  OSG is a scene graph 
API that sits on top of OpenGL and uses it to do its rendering.  This 
means you'll have to port your application to use OSG.  Porting from 
straight OpenGL to OSG is certainly possible, but it'll take some work.


--J

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


Re: [osg-users] svn error during checkout

2009-07-29 Thread Jose Luis Hidalgo
Hi,

   Just out of curiosity, have you tried another SVN client... ?I will
try to look futher on the timeout thing that looks like the one to
blame... but tomorrow.

JL.



On Wed, Jul 29, 2009 at 7:29 PM, S Andreasonsandrea...@gmail.com wrote:

   Could you try again? I've changed some apache timeouts (there were
 too short), and now I can make checkouts with no dropped connections.


 It goes longer until the error, 45 seconds, 100 seconds the last time I
 stared at it counting... This time as I write this, it has gone, oops, there
 it stopped at about  3 minutes.

 Hi,

 I have reached an impasse.
 Perhaps the file next in line, is larger than the time it takes to
 error? I can go no farther.
 52 of 77Mb retrieved. (or it Was 77Mb in January)

 It gets data for a variable length of time, usually has a 10 second
 break of inactivity, gets more data, then crashes.
 The times below are not perfect, depending on how long it takes me to
 notice it stopped. (usually about 10 seconds)

 Jul-29 7:43:06 [1[pts/7:21]sandreas /1src/SVN svn checkout
 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
 A    OpenSceneGraph/src/osgTerrain/GeometryTechnique.cpp
 A    OpenSceneGraph/src/osgTerrain/TerrainTile.cpp
 A    OpenSceneGraph/src/osgTerrain/Locator.cpp
 A    OpenSceneGraph/src/osgTerrain/Terrain.cpp
 A    OpenSceneGraph/src/osgTerrain/Version.cpp
 A    OpenSceneGraph/src/osgTerrain/TerrainTechnique.cpp
 A    OpenSceneGraph/src/osgTerrain/CMakeLists.txt
 A    OpenSceneGraph/src/osgTerrain/Layer.cpp
 A    OpenSceneGraph/src/CMakeLists.txt
 A    OpenSceneGraph/CTestConfig.cmake
 svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response
 body: connection was closed by server. (http://www.openscenegraph.org)
 Jul-29 7:44:08 [1[pts/7:22]sandreas /usr/src/SVN svn checkout
 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
 svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response
 body: connection was closed by server. (http://www.openscenegraph.org)
 Jul-29 7:45:09 [1[pts/7:23]sandreas /usr/src/SVN svn checkout
 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
 svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response
 body: connection was closed by server. (http://www.openscenegraph.org)
 Jul-29 7:47:41 [1[pts/7:24]sandreas /usr/src/SVN svn checkout
 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
 svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response
 body: connection was closed by server. (http://www.openscenegraph.org)
 Jul-29 7:48:40 [1[pts/7:25]sandreas /usr/src/SVN svn checkout
 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
 svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response
 body: connection was closed by server. (http://www.openscenegraph.org)
 Jul-29 7:50:22 [1[pts/7:26]sandreas /usr/src/SVN svn checkout
 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
 svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response
 body: connection was closed by server. (http://www.openscenegraph.org)
 Jul-29 7:51:30 [1[pts/7:27]sandreas /usr/src/SVN


 Also, I noticed apr-util depended on db-4.0, but subversion wasn't happy
 with that, so I upgraded to db-4.7 and apr-1.3.7 which removed a couple
 warnings.
 Alas, still same error.

 svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk
 OpenSceneGraph
 svn: REPORT of '/svn/osg/!svn/vcc/default': Could not read response body:
 connection was closed by server. (http://www.openscenegraph.org)
 Jul-29 10:18:18 [1[pts/6:69]sandreas /usr/src/SVN

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




-- 
  Jose L. Hidalgo Valiño (PpluX)
   http://www.pplux.com 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG and WPF Questions

2009-07-29 Thread Sergey Kurdakov
Hi Martin.

but the problem is that I want to integrate the window in the
WPF-application and not open another window :(

take a closer look at OpenGLUserControl.h - it is a control with HWND for
WPF.

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