Re: [osg-users] glMultiTexCoord4f , OSG with OGL code

2009-08-06 Thread Stephan Huber
Hi, Pau Moreno schrieb: brickVertexObject-readShaderFile ( osg::Shader::VERTEX , /home/Pau/OSG/Test1/Debug/Shaders/TestG80_VS.glsl ); brickFragmentObject-readShaderFile( osg::Shader::FRAGMENT , /home/Pau/OSG/Test1/Debug/Shaders/TestG80_GS2.glsl );

Re: [osg-users] how to draw a Curved Surface on the top of terrain?

2009-08-06 Thread Pan Li
Hi, thanks for all your replies; use overlaynode,but the projected texture is not right, any ideas?thanks!! attached : yellow lines-profile of geometry Code: geometry-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::POLYGON,0,v-size())) ; geode-addChild(geometry);

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

2009-08-06 Thread Sukender
Hi Robert Jan, Ok. I'm pretty sure I won't be able to update the 3DS loader unless I really really need it to be updated. That's too bad because it could be nice. Moreover, I bet we could have a very nice reader that also reads animations keyframes and use osgAnimation for that. (sigh)

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

2009-08-06 Thread Kim Bale
I think I see your problem Peter, you have to run CMake from the root directory not the src directory the text box is a little misleading. So the osgOcean directory tree looks a bit like this ..\osgOcean\ - direct cmake to here ..\osgOcean\src\ ..\osgOcean\include\ ..\osgOcean\resources\ So

[osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Mach Bhai
Hi, I have a model in ive format and osgviewer displays it fine. However if i convert it to osg, i get black and white shaded files as textures, which are of no use. I am using osgconv.exe with the following command line osgconv.exe -e osg -O OutputTextureFiles -O precision:0.001 model.ive

Re: [osg-users] OSG and shaders

2009-08-06 Thread Hadrien Thomas
Thank you for the book reference. I will think about purchasing it. I can afford it but it's a big expense for me :-* For now, I'm still blocked with OSG. I want to map the same texture to the 6 faces of a cube. I made a Geometry called cube and 6 DrawElementsUInt called face1/2/.../6. I

Re: [osg-users] OSG and shaders

2009-08-06 Thread Kim Bale
I agree with Paul, the Orange book is a *must have* title if you're learning shaders. http://books.google.co.uk/books?id=kDXOXv_GeswCdq=opengl+shader+languageprintsec=frontcoversource=bnhl=enei=E5Z6Svb-K5Cy-AbQ87lSsa=Xoi=book_resultct=resultresnum=5#v=onepageq=opengl%20shader%20languagef=false

Re: [osg-users] Computing depth buffer in osgVolume

2009-08-06 Thread Robert Osfield
Hi Yvon, The present osgVolume shaders that I've written compute the ray start position from the initial fragment generated by rendered the backface of the cube, then shoots the ray forward towards the eye point and then clamps this to the dimensions of the cube. It then computes the texcoords

Re: [osg-users] Importance Of Node Path List In Database Pager

2009-08-06 Thread Robert Osfield
Hi Ryan, On Wed, Aug 5, 2009 at 10:36 PM, Kawicki, Ryan Hryan.h.kawi...@boeing.com wrote: I was just curious to see if anything was committed to the 2.9.x / 2.10 baselines for this.  I know that you stated that you already had code in place to fix this issue.  Thanks. I thought I had code

Re: [osg-users] OSG and shaders

2009-08-06 Thread Maxime BOUCHER
Hi, carnibirdy wrote: For now, I'm still blocked with OSG. I want to map the same texture to the 6 faces of a cube. I made a Geometry called cube and 6 DrawElementsUInt called face1/2/.../6. I don't know how to setTexCoords to each QUADS. I thought about making 6 Geometry so I can use

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

2009-08-06 Thread Tanguy Fautre
Hi Robert, You do have to understand that what is currently happening is an implicit init/destroyOsg through DllMain. The problem is that DllMain is full of limitations. Only a handful of kernel functions can be safely called in DllMain. Worse, Microsoft in all their wisdom does not provide the

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

2009-08-06 Thread Daniel Trstenjak
Hi Tanguy, static Mutex s_mutex; const char * getSingletonGlExtensionDisable() { ScopedLock lock(s_mutex); static const char * env = getenv(OSG_GL_EXTENSION_DISABLE); return env; } This doesn't make sense, because 'getenv' is called only once, during the initialization

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

2009-08-06 Thread Tanguy Fautre
Hi Daniel, Your proposed solution looks like a variant of the Double Checked Locking. Unfortunately, this design pattern is very subtly broken and not thread safe. See http://www.aristeia.com/Papers/DDJ_Jul_Aug_2004_revised.pdf for more information. I've however shown this example just to

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

2009-08-06 Thread Robert Osfield
Hi Tanguy, I was wondering about the possibility of wrapping up the access to the sensitive C functions using a Mutex. We couldn't do it in local code, but would need to do it via a single custom getenv() etc. function implementation, otherwise we'd still end up with multiple functions

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

2009-08-06 Thread Tanguy Fautre
Hi Robert, Unfortunately serializing the access to getenv() is not likely to solve the issue. The problem is not that OSG calls several getenv() in parallel, the problem is that getenv() should not be called *at all* in DllMain(). Serializing getenv() in OSG does not guarantee that another C

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Joakim Simonsson
On Thu, 06 Aug 2009 10:31:57 +0200, Mach Bhai sar...@dsi.co.ae wrote: Hi, I have a model in ive format and osgviewer displays it fine. However if i convert it to osg, i get black and white shaded files as textures, which are of no use. I am using osgconv.exe with the following command

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

2009-08-06 Thread Daniel Trstenjak
Hi Tanguy, Your proposed solution looks like a variant of the Double Checked Locking. Unfortunately, this design pattern is very subtly broken and not thread safe. See http://www.aristeia.com/Papers/DDJ_Jul_Aug_2004_revised.pdf for more information. It depends what you want to make thread

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Mach Bhai
Thanks but it didnt work. I am still not getting correct textures. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15901#15901 ___ osg-users mailing list osg-users@lists.openscenegraph.org

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

2009-08-06 Thread Robert Osfield
Hi Tanguy, On Thu, Aug 6, 2009 at 12:53 PM, Tanguy Fautretang...@aristechnologies.com wrote: Unfortunately serializing the access to getenv() is not likely to solve the issue. The problem is not that OSG calls several getenv() in parallel, the problem is that getenv() should not be called *at

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Joakim Simonsson
On Thu, 06 Aug 2009 14:00:15 +0200, Joakim Simonsson joa...@autosim.no wrote: On Thu, 06 Aug 2009 10:31:57 +0200, Mach Bhai sar...@dsi.co.ae wrote: Hi, I have a model in ive format and osgviewer displays it fine. However if i convert it to osg, i get black and white shaded files as

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Mach Bhai
Yes i am also getting rgb files. It might be that something is wrong with that plugin but i cannot verify. Can we specify the format of the texture ? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15904#15904

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Joakim Simonsson
No, it is not possible. The current osg implementation looks for the filename extension for the texture inside the .ive file. If the texture originally was an .rgb texture, it will try to write it to that format as well. On Thu, 06 Aug 2009 14:17:43 +0200, Mach Bhai sar...@dsi.co.ae wrote:

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

2009-08-06 Thread Tanguy Fautre
Hi Robert, As you said, doing (2) const char * getSingletonGlExtensionDisable() { ScopedLock lock(s_mutex); static const char * env = getenv(OSG_GL_EXTENSION_DISABLE); return env; } instead of (1) static const char * env = getenv(OSG_GL_EXTENSION_DISABLE); Ensures that the

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

2009-08-06 Thread Robert Osfield
Hi Tanguy, As a first step I've just moved the GLExtension.cpp code that does the static getenv() into the osg::getGLExtensionDisableString() method so it now reads: std::string osg::getGLExtensionDisableString() { static const char* envVar = getenv(OSG_GL_EXTENSION_DISABLE); static

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Mach Bhai
So how can this issue be resolved ? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15908#15908 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Joakim Simonsson
You are using compressed textures in the ive file, right? I figured out that the rgb plugin can't write compressed textures. The only pixel formats that are supported are: GLenum pixelFormat = img.getPixelFormat(); raw.sizeZ = pixelFormat ==

[osg-users] Hello from New Orleans

2009-08-06 Thread Paul MARTZ
OSG BOF was a success. Attendance was light, 65 people, but overall conference attendance was down this year. Traveling today, more later including photos. Paul Martz Skew Matrix Software http://www.skew-matrix.com +1 303 859 9466 ___ osg-users

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Mach Bhai
I will want to go with the first approach and add support for writing compressed textures. So how can I go about uncompressing this data ? Any clues ? and thanks for your help. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15911#15911

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

2009-08-06 Thread Tanguy Fautre
Hi Robert, We've got a custom build of OSG where we've commented out all the unsafe getenv (we do not use env variables in our application anyway). I'm gonna give your patch a few runs. In theory, it should not deadlock (considering all the other unsafe getenv are already commented out).

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Joakim Simonsson
On Thu, 06 Aug 2009 14:55:12 +0200, Mach Bhai sar...@dsi.co.ae wrote: I will want to go with the first approach and add support for writing compressed textures. So how can I go about uncompressing this data ? Any clues ? You have to write an S3TC uncompressor. I have done this in a school

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Mach Bhai
If you can do that, it would be very kind of you. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15915#15915 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Joakim Simonsson
Gotta go now. See what I can do tomorrow. On Thu, 06 Aug 2009 15:24:40 +0200, Mach Bhai sar...@dsi.co.ae wrote: If you can do that, it would be very kind of you. -- Joakim Simonsson ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Mach Bhai
thanks i am looking forward to your help -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15917#15917 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Robert Osfield
Hi Mach, The .dds plugin supports writing compressed textures, so changing the extension of the images from .rgb to .dds would probably do the trick. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Mach Bhai
Thanks, i only have the ive files, i dont have the original texture files. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15919#15919 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Mach Bhai
Hi, After tinkering with the code, i changed the filename to dds in the code and then in the resulting osg file also, i changed all references to .dds Worked like a charm :) Thanks to all of you. -- Read this topic online here:

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread dtidrow
Hi Mach, The .dds plugin supports writing compressed textures, so changing the extension of the images from .rgb to .dds would probably do the trick. Robert. I had a similar problem with .ive files containing compressed textures, but named with .rgb extensions. I had to do basically what

[osg-users] Z-buffer transparency / Alpha

2009-08-06 Thread Maxime BOUCHER
Hi, I know Z-buffer isn't very in fond of transparency, and actually, when I capture it on a model having transparent faces it stores strange things (a kind of luminance image of some textures on parts corresponding to these transparents faces). Thus, I tried to deactivate it, but I didn't

[osg-users] osgShadow and nested RTT-cams

2009-08-06 Thread Felix Heide
Hey folks, i have a problem with using the osgShadow nodekit together with nested RTT-Cams. A scenegraph as illustrated in the following image works fine: [Image: http://img7.imageshack.us/img7/5274/sgwithoutrttcam.png ] But problems arise, when i use an RTT-Cam to render this scenegraph to an

Re: [osg-users] osgconv.exe textures getting mangled

2009-08-06 Thread Chris 'Xenon' Hanson
Joakim Simonsson wrote: Gotta go now. See what I can do tomorrow. On Thu, 06 Aug 2009 15:24:40 +0200, Mach Bhai sar...@dsi.co.ae wrote: If you can do that, it would be very kind of you. LibSquish: http://code.google.com/p/libsquish/ Supports the DXT1, DXT3 and DXT5 formats for both

Re: [osg-users] how to draw a Curved Surface on the top of terrain?

2009-08-06 Thread Chris 'Xenon' Hanson
Pan Li wrote: I want to draw a curved surface dynamic, like the function Mesure area in skyline. now i have the profile line of the curved surface,but just lines,not a polygon or a surface. Well, the example you showed is using texturing. I suspect if that's the effect you want, you'll

[osg-users] Displaysetting CHECKERBOARD

2009-08-06 Thread Katja Oechsner
Hey everyone, I have a problem with the Displaysetting CHECKERBOARD. I have a dpl-tv with stereo glasses and need to use the checkerboard-option for this. I am using one window with two channels, one for each eye. The StereoMode is for both channels checkerboard, stencil is 8 and the

Re: [osg-users] glMultiTexCoord4f , OSG with OGL code

2009-08-06 Thread Pau Moreno
Hi, I saw this mistake before and I correct it but I'm still having the same error. With all the shaders :S Any idea? Thank you! Cheers, Pau -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15927#15927

Re: [osg-users] glMultiTexCoord4f , OSG with OGL code

2009-08-06 Thread Pau Moreno
Ok, I finally can solve it with this function: loadShaderSourceFromFile(...) No I'm not having errors of compiling shaders, and executing it. Returning to the topic of this post: If I comment the MultitexCoord line, nothing is showing in the viewer, but that's logic. The problem if is it

Re: [osg-users] OpenSceneGraph-2.8.2 released

2009-08-06 Thread Sukender
MD5 checksums for VC8: AA3E9C1E092C49F0D1967CD189E22598 libopenscenegraph-2.8.2-win32-x86-vc80sp1-Debug.zip AFD1D03805A9C8A77D176C1E21100951 libopenscenegraph-2.8.2-win32-x86-vc80sp1-Release.zip F2A9756CC140883639CEF1FF92765BB5 libopenscenegraph-dev-2.8.2-win32-x86-vc80sp1-Debug.zip

[osg-users] Problems compiling OSG 2.8.2 on Solaris 10

2009-08-06 Thread Rydzak, Carol-P28503
Hi list! I have run the commands listed in the readme for osg and this is what I am getting. We have the version 7.4.4 version of the Mesa libraries installed (libGL.so libGLU.so). Can someone please help me out with fixing this problem? I would expect that anyone running on Solaris would

[osg-users] osg::Image with signed int

2009-08-06 Thread Pau Moreno
Hi, I've create an int matrix[16][256] and I need to pass it to the GPU. So what I've done is create a osg::Image, but when I have to pass the data to setImage, I have to do a cast to my data, because it needs an unsigned char *. My matrix contains signed ints so I cannot cast it to a unsigned

Re: [osg-users] Vec2ul and isomorphic variants?

2009-08-06 Thread Chris 'Xenon' Hanson
Tomlinson, Gordon wrote: Hi Chris We for one use vec arrays out side these, it would be nice to have OSG support all the typically POD types :). It would makes a few thing more straight forward for us I started looking at this issue. I can certainly create VecnBlah types out the ying-yang,