Re: [osg-users] osgart 2.0 with osg2.9.8 video blinking

2010-09-29 Thread Huan Wei
I am very sorry, i tried it again and texture rectangle working, so Thomas you 
are right. but this bug would be corrected.

Thank you!

Cheers,
Huan

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





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


[osg-users] Stereo anaglyph: which glasses?

2010-09-29 Thread Francesco Argese
Hi,

I have enabled anaglyph stereo visualization on my application and I have tried 
some red/cyan glasses. 

Watching app only with one eye at a time it appear that cyan lens works well (I 
see only one image without noise) while the red lens show ghosting problems.

I have did a research among the old post hoping that someone had my same 
problem. I have found only the post  source for 3d glasses [1] but there 
there are no information about the type of glasses and the appropriate colour 
of lenses.

Could anyone give me any suggestions about the appropriate colour of lenses?

Thank you!

Cheers,
Francesco

[1] http://forum.openscenegraph.org/viewtopic.php?t=5215highlight=glasses

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





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


[osg-users] Solved Re: Problem compiling 2.9.9 with Qt in MacOSX

2010-09-29 Thread Alejandro Aguilar Sierra
Hi,

Apparently the only problem was that I had Qt 32bits only. I updated
Qt to the latest version with cocoa and 64b support and OSG 2.9.9
compiled without complain.

Thanks for the help anyway.  ;-)

-- A.


On Tue, Sep 28, 2010 at 12:58 PM, Alejandro Aguilar Sierra
algsie...@gmail.com wrote:
 Hello:

 I am trying to compile 2.9.9 in a Mac OSX 10.6 snow leopard and I got
 a problem with Qt (error log below). In fact it would be better if I
 can compile it without Qt.

 Any hint?

 Regards,

 --
 Alejandro


 [ 98%] Building CXX object
 src/osgQt/CMakeFiles/osgQt.dir/QFontImplementation.cpp.o
 In file included from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtCore.framework/Headers/qnamespace.h:45,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtCore.framework/Headers/qobjectdefs.h:45,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qwindowdefs.h:45,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qfont.h:45,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/QFont:1,
                 from
 /Users/ale/src/OpenSceneGraph-2.9.9/include/osgQt/QFontImplementation:19,
                 from
 /Users/ale/src/OpenSceneGraph-2.9.9/src/osgQt/QFontImplementation.cpp:13:
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtCore.framework/Headers/qglobal.h:288:2:
 error: #error You are building a 64-bit application, but using a
 32-bit version of Qt. Check your build configuration.
 In file included from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qmatrix.h:46,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qtransform.h:44,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qimage.h:45,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/QImage:1,
                 from
 /Users/ale/src/OpenSceneGraph-2.9.9/src/osgQt/QFontImplementation.cpp:21:
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qregion.h:
 In member function ‘OpaqueRgnHandle* QRegion::handle(bool) const’:
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qregion.h:160:
 error: ‘toQDRgn’ was not declared in this scope
 lipo: can't figure out the architecture type of:
 /var/folders/qE/qEL4-gb+HEiohD3qgoFONE+++TI/-Tmp-//ccGy7LHP.out
 make[2]: *** [src/osgQt/CMakeFiles/osgQt.dir/QFontImplementation.cpp.o] Error 
 1
 make[1]: *** [src/osgQt/CMakeFiles/osgQt.dir/all] Error 2
 make: *** [all] Error 2
 Alejandro-Aguilar-Sierras-iMac:OpenSceneGraph-2.9.9 ale$ ccmake .

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


Re: [osg-users] Load of 8 bits image for creating texture

2010-09-29 Thread Adrien Chassard
Hi Robert,

Thanks for your quick reply.

I had done exactly what you've said. So something else should be wrong in my 
code (perhaps in the loading of the image).
I have to investigate more...

Thanks again,
Regards,
Adrien

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





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


Re: [osg-users] Stereo anaglyph: which glasses?

2010-09-29 Thread Ulrich Hertlein
Hi Francesco,

On 29/09/10 17:03 , Francesco Argese wrote:
 I have enabled anaglyph stereo visualization on my application and I have 
 tried some
 red/cyan glasses.
 
 Watching app only with one eye at a time it appear that cyan lens works well 
 (I see
 only one image without noise) while the red lens show ghosting problems.
 
 I have did a research among the old post hoping that someone had my same 
 problem. I
 have found only the post  source for 3d glasses [1] but there there are no
 information about the type of glasses and the appropriate colour of lenses.

Presumably you don't have a color-calibrated monitor, like most of us, so the 
chances that
the red/cyan RGB values that are picked by OSG, the values sent to the monitor, 
and the
actual color values displayed match your glasses are virtually zero.

This is probably more a case of tweaking the OSG red/cyan to match whatever 
glasses you have.

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


Re: [osg-users] IPhone retina displays

2010-09-29 Thread Stephan Huber
Hi Tom,

Am 29.09.10 02:43, schrieb Thomas Hogarth:
 Good news on this
 
 All seems to be working, I've also improved
 the IPhoneWindowingSystemInterface to handle true resolutions and multiple
 screens. So on IPad we should now be able to set a window to an external
 screen and also change the res of the screen (I don't have an IPad though so
 needs testing, but should work, gulp :) )
 
 In the end I've gone for the approach of IPhoneWindowingSystemInterface
 providing the actual pixel res of the screen. Then by default if the user
 does not set a viewContentScaleFactor in their windowData, the screens
 scaleFactor is used. This means the default context created by osg viewer
 will always be full pixel res and the window will be full points res. This
 was so that I didn't have to create a context of a different size to that
 requested by default.
 
 If the user needs backward compatibility they have to set the traits width
 and height themselves and set the windowData viewContentScaleFactor to 1.0.
 
 I still need to do a bit of testing as I think my objective c code is
 leaking but I'll get the changes checked in asap.


Wow, nice work, I am eager to test your new code on the ipad with an
external display.

I added yesterday support for MSAA to GraphicsWindowIPhone, it's
available when you setup your base sdk to a version = 4.0 and set the
GraphicsContext::Traits accordingly.

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


Re: [osg-users] Problem loading images when migrating to new OSGViewer

2010-09-29 Thread Robert Osfield
Hi John,

On Tue, Sep 28, 2010 at 6:36 PM, John Stokes jstokes2...@yahoo.com wrote:
 When I comment out the updated setComputeNearFarMode line of code, my globe 
 and sky models show up correctly but my plane model disappears. Is there a 
 correct cull setting that I should be using to get everything to display?

 I tried using the COMPUTE_NEAR_FAR_USING_PRIMITIVES and 
 COMPUTE_NEAR_FAR_USING_BOUNDING_VALUES with this call, but I'm not quite 
 sure what bounding value I should be using or if I should be looking at 
 another culling method.

OK, this is good, you've isolated the issue to one of management of
the near/far planes, so now it's a case of finding the appropriate
technique for you type of application/models.

First up the near/far planes are computed during the cull traversal,
using COMPUTE_NEAR_FAR_USING_PRIMITIVES will be more accurate and
provide a tighter bound than COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES
but it's more expensive to compute.  Both techniques still use
clamping of the near/far values to avoid the ratio getting too low
which will cause z fighting, this clamping by default pushes out the
near value to obtain a specified near/far ratio.  The
CullSetting::setNearFarRatio(double) sets this value, and Camera
subclasses from CullSettings so you can do:

camera-setNearFarRatio(0.0001); // default value is 0.0005;

It may well be that this in OSG-2.x this near/far ratio is set more
conservatively than OSG-0.9.9 and is the reason why you are seeing
differences.  Have a look at the source code to see what the old
default value was.

--

For scenes which have a very large depth range that tweaking the
near/far planes isn't sufficient it can be useful to using depth
partioning, where you render the scene two or more times, varying the
region that is rendered in each pass.  This osgdepthpartion examples
shows this in action.  This example is a bit out of date and should
really be implemented with viewer slave Cameras rather than in scene
graph Camera, but the principles are the same.

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


Re: [osg-users] Problem compiling 2.9.9 with Qt in MacOSX

2010-09-29 Thread Robert Osfield
Hi Alejandro,

You are hitting an issue with OSX support for building against
32bit/64bit in the same binary, in your case you are building the OSG
to build both, but then trying to compile against a Qt lib which is
32bit only.

Go into CMake and remove the x86_64 entry in the
CMAKE_OSX_ARCHITECTURES and then press 'c' to configure and 'g' to
generate the build system.  Then rebuild the OSG.  Or just build Qt
against 32 and 64bit.

Robert.

On Tue, Sep 28, 2010 at 6:58 PM, Alejandro Aguilar Sierra
algsie...@gmail.com wrote:
 Hello:

 I am trying to compile 2.9.9 in a Mac OSX 10.6 snow leopard and I got
 a problem with Qt (error log below). In fact it would be better if I
 can compile it without Qt.

 Any hint?

 Regards,

 --
 Alejandro


 [ 98%] Building CXX object
 src/osgQt/CMakeFiles/osgQt.dir/QFontImplementation.cpp.o
 In file included from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtCore.framework/Headers/qnamespace.h:45,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtCore.framework/Headers/qobjectdefs.h:45,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qwindowdefs.h:45,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qfont.h:45,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/QFont:1,
                 from
 /Users/ale/src/OpenSceneGraph-2.9.9/include/osgQt/QFontImplementation:19,
                 from
 /Users/ale/src/OpenSceneGraph-2.9.9/src/osgQt/QFontImplementation.cpp:13:
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtCore.framework/Headers/qglobal.h:288:2:
 error: #error You are building a 64-bit application, but using a
 32-bit version of Qt. Check your build configuration.
 In file included from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qmatrix.h:46,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qtransform.h:44,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qimage.h:45,
                 from
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/QImage:1,
                 from
 /Users/ale/src/OpenSceneGraph-2.9.9/src/osgQt/QFontImplementation.cpp:21:
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qregion.h:
 In member function ‘OpaqueRgnHandle* QRegion::handle(bool) const’:
 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/QtGui.framework/Headers/qregion.h:160:
 error: ‘toQDRgn’ was not declared in this scope
 lipo: can't figure out the architecture type of:
 /var/folders/qE/qEL4-gb+HEiohD3qgoFONE+++TI/-Tmp-//ccGy7LHP.out
 make[2]: *** [src/osgQt/CMakeFiles/osgQt.dir/QFontImplementation.cpp.o] Error 
 1
 make[1]: *** [src/osgQt/CMakeFiles/osgQt.dir/all] Error 2
 make: *** [all] Error 2
 Alejandro-Aguilar-Sierras-iMac:OpenSceneGraph-2.9.9 ale$ ccmake .
 ___
 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] OSG and SDL

2010-09-29 Thread Robert Osfield
Hi Matt,

I'd recommend using SDL for joystick input and osgViewer for windowing
as the later has far more flexible and powerful windowing and
threading support.  An example of mixing SDL for joystick input and
osgViewer for windowing can be found in the applications/present3D
application.

Robert.

On Tue, Sep 28, 2010 at 6:33 PM, Matt Caron mcindafi...@gmail.com wrote:
 Hi,

 I am using SDL to get input from a joystick so that I can integrate joystick 
 control in OSG (I have tried the VRPN approach and right now SDL is looking 
 better for my needs).

 I have searched for as much information about integrating OSG and SDL as 
 possible, and so far it appears that I must use SDL windows and have OSG draw 
 to SDL windows, instead of OSG using its own windowing system.

 Does anyone know if this assertion is accurate?  Is there any way to connect 
 SDL through an OSG Viewer?  All I care about are the input events associated 
 with the joystick...


 Thank you!

 Cheers,
 Matt

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





 ___
 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] Stereo anaglyph: which glasses?

2010-09-29 Thread Francesco Argese

Ulrich Hertlein wrote:
 Hi Francesco,
 Presumably you don't have a color-calibrated monitor, like most of us, so the 
 chances that
 the red/cyan RGB values that are picked by OSG, the values sent to the 
 monitor, and the
 actual color values displayed match your glasses are virtually zero.


How can I calibrate colours of my monitor? Are there some tools to do so?


 This is probably more a case of tweaking the OSG red/cyan to match whatever 
 glasses you have.
 


How can I tweak OSG red/cyan?

Cheers
Francesco

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





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


[osg-users] convertLatLongHeightToXYZ

2010-09-29 Thread lucie lemonnier
Hi,
Can you explain me a little the function 
osg::EllipsoidModel::convertXYZToLatLongHeight?
I don't understand why x and y are calculated based on height.
If I changed the height of a model and I don't change the latitude and 
longitude, x and y change. Why?

Thank you!

Cheers,
lucie

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





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


Re: [osg-users] convertLatLongHeightToXYZ

2010-09-29 Thread Robert Osfield
HI Lucie,

The XYZ are in Earth Center Earth Fixed coordinates, not local
coordinates to surface of the earth.

Robert.

On Wed, Sep 29, 2010 at 9:52 AM, lucie lemonnier
lucielemonn...@hotmail.fr wrote:
 Hi,
 Can you explain me a little the function 
 osg::EllipsoidModel::convertXYZToLatLongHeight?
 I don't understand why x and y are calculated based on height.
 If I changed the height of a model and I don't change the latitude and 
 longitude, x and y change. Why?

 Thank you!

 Cheers,
 lucie

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





 ___
 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] Add a new child

2010-09-29 Thread Cosimo Luigi Manes

Ulrich Hertlein wrote:
 On 28/09/10 18:45 , Cosimo Luigi Manes wrote:
 osgGA::CameraManipulator (the base class for the default manipulators) has a 
 'home()'
 method than will recompute the position if 'setAutoComputeHomePosition' is 
 true.
 


Thanks you for your answer. Could you post an example of code because i am a 
newbie. Also, if i want to run a rotation or translation or zoom, what should i 
do ?

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





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


Re: [osg-users] convertLatLongHeightToXYZ

2010-09-29 Thread lucie lemonnier
Hi,

I understood that the XYZ are in Earth Center Earth Fixed coordinates.
So is it normal that X,Y are calculated based on height?
In fact, I put a latitude, longitude and height on a model, I use 
osg::EllipsoidModel::convertLatLongHeightToXYZ to obtain the position x,y,z and 
I transform my point with the MatrixTransforms applied on the terrain model and 
I place my model with the transformed point.
Is it the step to be followed? 

Thank you!

Cheers,
lucie

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





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


Re: [osg-users] convertLatLongHeightToXYZ

2010-09-29 Thread Robert Osfield
Hi Lucie,

On Wed, Sep 29, 2010 at 10:43 AM, lucie lemonnier
lucielemonn...@hotmail.fr wrote:
 I understood that the XYZ are in Earth Center Earth Fixed coordinates.
 So is it normal that X,Y are calculated based on height?

I'm a bit confused by your question, in ECEF the coordinate is always
XYZ, one doesn't ever just consider XY, this would just be a
projection of the each onto a flat cross section through the side of
the each, not sure what use this would be.

 In fact, I put a latitude, longitude and height on a model, I use 
 osg::EllipsoidModel::convertLatLongHeightToXYZ to obtain the position x,y,z 
 and I transform my point with the MatrixTransforms applied on the terrain 
 model and I place my model with the transformed point.
 Is it the step to be followed?

One normally uses a transform node to enable one to place local
coordinates into the ECEF coordinate frame without lose of precision
when computing intersections and doing rendering.  The osgTerrain
NodeKit uses transforms to avoid numerical issues, so have a look at
src/osgTerrain/GeometryTechnique.cpp  it see how it computes it's
transform and local coordinates.

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


Re: [osg-users] convertLatLongHeightToXYZ

2010-09-29 Thread lucie lemonnier
Hi,

Thank you for your reply. 
I will look at this.

Cheers,
lucie

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





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


Re: [osg-users] Add a new child

2010-09-29 Thread Ulrich Hertlein
On 29/09/10 19:27 , Cosimo Luigi Manes wrote:
 Ulrich Hertlein wrote:
 On 28/09/10 18:45 , Cosimo Luigi Manes wrote: osgGA::CameraManipulator (the 
 base
 class for the default manipulators) has a 'home()' method than will 
 recompute the
 position if 'setAutoComputeHomePosition' is true.
 
 Thanks you for your answer. Could you post an example of code because i am a 
 newbie.

viewer.getCameraManipulator()-home();

 Also, if i want to run a rotation or translation or zoom, what should i do ?

I'd recommend you read the OSG QuickStartGuide, it covers this and many other 
aspects of OSG.

Basically what you need to do it modify the camera matrix to obtain 
rotation/translation
and modify the field-of-view to zoom.

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


Re: [osg-users] Stereo anaglyph: which glasses?

2010-09-29 Thread Jan Ciger
On Wed, Sep 29, 2010 at 10:35 AM, Francesco Argese kekk...@gmail.com wrote:
 How can I calibrate colours of my monitor? Are there some tools to do so?

Look up ICC color profiles or color management:
http://en.wikipedia.org/wiki/ICC_profile
On the other hand, this isn't going to be of much use to you, because
also the software needs to use the profiles to adjust the color
representation. OSG doesn't do that.

 How can I tweak OSG red/cyan?

I suppose you will need to change the rendering code, I am not aware
of this being tweakable anywhere, as only OpenGL color masks are
being used - which basically say render everything into red or blue
channel (or some combination of them).

Regards,

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


[osg-users] adding a grid to another plane

2010-09-29 Thread Nitin Rangari
hi all,

i want to draw grid  for that i am using osg::HeightField but it is
drawing only in xy Plane.
is it possible to draw in another plane?..

thanks and regard
Nitin Rangari
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PBOs and stutterless texture uploading

2010-09-29 Thread Ulrich Hertlein
Hi Eduard,

On 28/09/10 6:08 , Eduard - Gabriel Munteanu wrote:
 I've been investigating an issue in Flightgear, an OSS flight sim using
 OSG. We have lots of stutter, usually in multiplayer, caused by loading
 new models (this happens whenever somebody join). Loading textures from
 disk happens on another thread (via DatabasePager), but I traced the
 issue to glTexImage2D() calls. So it's texture uploading to graphics
 driver / card that's causing it. It's not uncommon to see delays of
 300ms for 500KiB - 1MiB textures.

Did you try to enable object pre-compiling on the DatabasePager thread via
'DatabasePager::setDoPreCompile(true)'?

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


Re: [osg-users] [osgPlugins] ffmpeg plugin : big delay

2010-09-29 Thread Malek Baklouti
Hi, 

I've tested this patch, but the delay got worst?! :?  :' 

Any idea?

Thanks,
Malek

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





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


Re: [osg-users] [osgPlugins] ffmpeg plugin : big delay

2010-09-29 Thread Mikhail I. Izmestev

Hi,


 I've tested this patch, but the delay got worst?! :?  :'

 Any idea?


Ok, can you tell me which pts of first frame?
I think you can decrease pts on first frame's pts instead 
m_stream-start_time.


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


[osg-users] Save texture changes via fragment shader

2010-09-29 Thread Aitor Ardanza
Hi,

I'm trying to implement a simple model painter. I detect the intersection with 
the mouse and loaded model, and I applied a red color to the area:

[Image: http://img818.imageshack.us/img818/9672/painting.jpg ]

You can see the selected point on the texture image.  I edit the texture image 
with Qt. 
But I want to save all changes to a new texture. It can be done in the fragment 
shader? I can think ...

Code:
uniform vec2 textCoord;
uniform sampler2D baseMap;
uniform sampler2D editedMap;
uniform vec3 interPos;

varying vec4 color;
varying vec2 Texcoord;
varying vec3 position;

void main( void )
{
float radio = 8.0;
vec3 a = position - interPos;
float dist = sqrt((a.x*a.x)+(a.y*a.y)+(a.z*a.z));
vec4 paintColor = vec4(1.0,0.0,0.0,1.0);
if(distradio){
gl_FragColor = texture2D( baseMap, Texcoord ) * color + paintColor;
//editedMap = texture2D( baseMap, Texcoord ) * color + paintColor;
}
else{
gl_FragColor = texture2D( baseMap, Texcoord ) * color; 
//editedMap = texture2D( baseMap, Texcoord ) * color;   
}

}



Thank you!

Cheers,
Aitor
Code:




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





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


Re: [osg-users] adding a grid to another plane

2010-09-29 Thread Paul Martz

On 9/29/2010 4:40 AM, Nitin Rangari wrote:

hi all,

 i want to draw grid  for that i am using osg::HeightField but it is drawing
only in xy Plane.
 is it possible to draw in another plane?..


osgWorks has a makeWirePlane() convenience function for this (See 
osgworks.googlecode.com).


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] adding a grid to another plane

2010-09-29 Thread Paul Martz

On 9/29/2010 8:37 AM, Paul Martz wrote:

i want to draw grid for that i am using osg::HeightField but it is drawing
only in xy Plane.
is it possible to draw in another plane?..


osgWorks has a makeWirePlane() convenience function for this (See
osgworks.googlecode.com).


Addendum: But makeWirePlane() is not a heightfield, it's a plane / grid. So if 
you really need a heightfield in a different plane, then makeWirePlane() is not 
a solution for you.


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] ffmpeg plugin : big delay

2010-09-29 Thread Malek Baklouti
Hi Mikhail, 

Here is my log file with some log informations. Please let me know if you need 
more tests.


 
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.541933
 (3) : [OSGFFMPEG DEBUG]214 frame_delay 0.0164432
 (3) : [OSGFFMPEG DEBUG]329 i_delay 16443
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.541944
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.541955
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.541966
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.541977
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.541989
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
  
   
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542011
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542022
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
  
   
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542033
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542044
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542055
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542066
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542077
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542089
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.5421
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542111
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542122
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542133
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542144
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 (3) : [OSGFFMPEG DEBUG]329 i_delay -5
 (3) : [OSGFFMPEG DEBUG]205 m_stream-start_time 48774
 (3) : [OSGFFMPEG DEBUG]207 pts 0
 (3) : [OSGFFMPEG DEBUG]213 synched_pts 0.542155
 (3) : [OSGFFMPEG DEBUG]214 frame_delay -5.6e-006
 

Re: [osg-users] adding a grid to another plane

2010-09-29 Thread Robert Osfield
H Nitin,

Try using the HeightField::setRotation(Quat) method.

Robert.

On Wed, Sep 29, 2010 at 11:40 AM, Nitin Rangari nit...@cctech.co.in wrote:
 hi all,
     i want to draw grid  for that i am using osg::HeightField but it is
 drawing only in xy Plane.
     is it possible to draw in another plane?..

 thanks and regard
 Nitin Rangari



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


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


[osg-users] OSG , Qt and osgsimplifier

2010-09-29 Thread Sajjad
Hello forum,


I am using the adapter widget to run OSG viewer with Qt.


When i try to port the osgsimplifier example in the OSG Qt viewer then the
program crashes with the following message:



terminate called after throwing an instance of 'std::logic_error'

what(): basic_string::_S_construct NULL not valid

The program has unexpectedly finished.

***


Any hint ?


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


Re: [osg-users] OSG , Qt and osgsimplifier

2010-09-29 Thread Jean-Sébastien Guay

Hello Sajjad,


Any hint ?


With only this information, the only hint we can give you is to use the 
debugger.


Running in debug, and enabling exception reporting, the debugger should 
break exactly where the crash occurs, and you should be able to go up 
the stack to see the source of the crash and see if you can fix it.


Hope this helps,

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] Creating a Visible Pivoting Vector/Cylinder

2010-09-29 Thread Richard Redding
Hi Tom,

Thanks a lot for your input. I will be coding that out today so hopefully I can 
get that all set up! Thanks again, more info on the situation as it develops!

... 

Cheers,
Richard

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





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


Re: [osg-users] OSG , Qt and osgsimplifier

2010-09-29 Thread Sajjad
Hello Jean,

Just ran the debugger. and crashes in the following line

*
viewer.frame();



***'

Any way to get around that ?  Each frame is shown  after the mesh is
simplified(). In qt adapter the viewer class has two parents AdapterWidget
and osg::osgViewer.


Could that be the problem ?


Regards
Sajjad

On Wed, Sep 29, 2010 at 6:48 PM, Jean-Sébastien Guay 
jean-sebastien.g...@cm-labs.com wrote:

 Hello Sajjad,

  Any hint ?


 With only this information, the only hint we can give you is to use the
 debugger.

 Running in debug, and enabling exception reporting, the debugger should
 break exactly where the crash occurs, and you should be able to go up the
 stack to see the source of the crash and see if you can fix it.

 Hope this helps,

 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

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


Re: [osg-users] convertLatLongHeightToXYZ

2010-09-29 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Lucie,

This is how you would place your model...

osg::Matrixd position;
ellipsoid-computeLocalToWorldTransformFromLatLongHeight(osg::DegreesToRadia
ns(lat),
osg::DegreesToRadians(lon), altitude, position);
transform-setMatrix(position);

where transform is an osg::MatrixTransform node that has your model as a
child node.

The X,Y,Z geocentric Cartesian coordinates from the lat,lon,alt can be
extracted by:

osg::Vec3d pos = position.getTrans();

Keep in mind that an altitude of zero will yield a point on the surface of
the spheroid for a given lat,lon pair. Any altitude  zero is the height
above the ellipsoid/spheroid.

Hope this helps...

-Shayne



-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of lucie
lemonnier
Sent: Wednesday, September 29, 2010 3:44 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] convertLatLongHeightToXYZ

Hi,

I understood that the XYZ are in Earth Center Earth Fixed coordinates.
So is it normal that X,Y are calculated based on height?
In fact, I put a latitude, longitude and height on a model, I use
osg::EllipsoidModel::convertLatLongHeightToXYZ to obtain the position x,y,z
and I transform my point with the MatrixTransforms applied on the terrain
model and I place my model with the transformed point.
Is it the step to be followed? 

Thank you!

Cheers,
lucie

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





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


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


Re: [osg-users] OSG , Qt and osgsimplifier

2010-09-29 Thread Jean-Sébastien Guay

Hello Sajjad,


Just ran the debugger. and crashes in the following line

*
viewer.frame();


Are you running a debug build in the debugger? Do you have the debugging 
symbols for OSG?


That specific line is not the site of the crash, it's something that 
function is doing, so to get to the real source of the crash you need to 
have debugging symbols and walk down the stack.


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


[osg-users] osgParticle restart...

2010-09-29 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
All,

 

I have a simple question regarding osgParticle effects.

 

Is there a simple way to restart the effects once they expire? For example,
I have a burning object emitting a smoke effect that I want to restart after
the smoke disappears. Is there a clean way to restart the smoke effect?

 

Thanks,

-Shayne



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


Re: [osg-users] OSG , Qt and osgsimplifier

2010-09-29 Thread Rob Radtke
 The only suggestion I can think of is to make sure you are using the 
single threaded threading model:


setThreadingModel(osgViewer::Viewer::SingleThreaded);

AFAIK, QT viewers will not work with any of OSG's multi-threaded models.

Rob

On 9/29/2010 9:35 AM, Sajjad wrote:

Hello forum,


I am using the adapter widget to run OSG viewer with Qt.


When i try to port the osgsimplifier example in the OSG Qt viewer then 
the program crashes with the following message:




terminate called after throwing an instance of 'std::logic_error'

what(): basic_string::_S_construct NULL not valid

The program has unexpectedly finished.


***


Any hint ?


Regards
Sajjad


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




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


Re: [osg-users] Add a new child

2010-09-29 Thread Cosimo Luigi Manes

Ulrich Hertlein wrote:
 
 I'd recommend you read the OSG QuickStartGuide, it covers this and many other 
 aspects of OSG.
 
 Basically what you need to do it modify the camera matrix to obtain 
 rotation/translation
 and modify the field-of-view to zoom.
 
 


thanks for the reply. I have already read QuickStartGuide OSG, but it isn't 
thorough. Can you post an example of code to execute for the operation of zoom, 
rotate and translation ? Where i can find other examples ?

thanks again

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





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


[osg-users] VBO Memory Usage

2010-09-29 Thread Jason Beverage
Hi Robert,

I've noticed some issues with memory usage when using VBOs.  The
attached example generates between 50K and 200K points per frame and
creates a new geometry for them with VBO's enabled.  If you run the
example, it appears as if the VBOs aren't properly being deleted and
my graphics memory quickly gets maxed out and it crashes in about 30
seconds.

I stuck some debugging output in GLBufferObject::deleteGLObject() and
it is never called so it appears as if the VBOs aren't being deleted
at all.

However, if you run the example with the --fixed argument, the
Vec3Array for the points is preallocated to a large number (300K) and
the points are just assigned to the array (vs using push_back).  This
means that each frame is getting a Vec3Array which is the same exact
size, but with a varying number of points to actually draw with the
DrawArrays.   I'm assuming this is causing OSG to take advantage of
some kind of VBO reuse as this causes the memory to be totally stable.

I'm running the latest SVN version of OSG.

Thanks!

Jason


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


[osg-users] Extract ModelView Projection Matrix for GLSL Program version 150 and higher

2010-09-29 Thread Peter Wrobrl
Hi,

gl_ModelViewProjectionMatrix and ftransform() are deprecated since GLSL Version 
120 ( but still working ), in Version 150 not working at all.
Is there a straight forward way to extract the current ModelView and Projection 
Matrices ( e.g. from StateSet ? ), without having to pass around the Camera 
through the SG, or extract osg::Transform World Matrix ?

Moreover, gl_Vertex is depreciated as well, so how to create a VBO ? Is it 
possible to use only VertexAttribArray, without VertexArray, NormalArray, etc. 
? 


Thank you!

Cheers,
ParticlePeter

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





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


Re: [osg-users] Extract ModelView Projection Matrix for GLSL Programversion 150 and higher

2010-09-29 Thread Wojciech Lewandowski

Hi Peter,

Can't you use compatibility profile ? All stuff you mention is still 
available in compatibility profile.


eg place it at the begining of GLSL Shader:

#version 150 compatibility
[shader code]

Wojtek


--
From: Peter Wrobrl particlepe...@gmx.de
Sent: Wednesday, September 29, 2010 9:21 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Extract ModelView Projection Matrix for GLSL 
Programversion 150 and higher



Hi,

gl_ModelViewProjectionMatrix and ftransform() are deprecated since GLSL 
Version 120 ( but still working ), in Version 150 not working at all.
Is there a straight forward way to extract the current ModelView and 
Projection Matrices ( e.g. from StateSet ? ), without having to pass 
around the Camera through the SG, or extract osg::Transform World Matrix ?


Moreover, gl_Vertex is depreciated as well, so how to create a VBO ? Is it 
possible to use only VertexAttribArray, without VertexArray, NormalArray, 
etc. ?



Thank you!

Cheers,
ParticlePeter

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





___
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