Re: [osg-users] GLSL and OSG

2009-06-28 Thread Tomlinson, Gordon
FYI:  if you search the OSG mail archives the reasons have been
discussed in detail before this


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 Ulrich
Hertlein
Sent: Friday, June 26, 2009 11:43 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] GLSL and OSG

On 26/6/09 4:39 PM, Maxime BOUCHER wrote:
> Just a question of curiosity.
>
>   I can guess Z and Y defaults haven't been change just for fun
neither the vector column/row.
>   But I wonder which are these reasons.

The Z-up is popular in the vis-sim industry as it feels more natural to
assume X-east, Y-north, Z-up.

But it's not hard-coded or anything, just the default.  You can change
it without problems by specifying an up vector of osg::Vec3(0,1,0).

Cheers,
/ulrich

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

2009-06-26 Thread Ulrich Hertlein

On 26/6/09 4:39 PM, Maxime BOUCHER wrote:

Just a question of curiosity.

  I can guess Z and Y defaults haven't been change just for fun neither the 
vector column/row.
  But I wonder which are these reasons.


The Z-up is popular in the vis-sim industry as it feels more natural to assume X-east, 
Y-north, Z-up.


But it's not hard-coded or anything, just the default.  You can change it without problems 
by specifying an up vector of osg::Vec3(0,1,0).


Cheers,
/ulrich

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


Re: [osg-users] GLSL and OSG

2009-06-26 Thread Maxime BOUCHER
Just a question of curiosity.

 I can guess Z and Y defaults haven't been change just for fun neither the 
vector column/row.
 But I wonder which are these reasons.

Does someone know about it?

Thanks,

Max

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





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


Re: [osg-users] GLSL and OSG

2009-06-26 Thread Maxime BOUCHER
Alright, thanks.


Max

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





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


Re: [osg-users] GLSL and OSG

2009-06-26 Thread Ulrich Hertlein

Hi Maxime,

On 26/6/09 2:44 PM, Maxime BOUCHER wrote:

2) More problematic. Y and Z axis are swapped between OSG and OpenGL. Thus do I 
have to
do a sort of swap between dimensions (so to say) ? For example, I have a camera 
with
view and projection, in osg conventions, and I use the viewmatrix in the 
shader. That's
why I wonder.


They aren't swapped.  OSG is using the same right-handed coordinate system as OpenGL, the 
only difference being that OSG by default uses Z-up whereas OpenGL uses Y-up by default.


There's no need to swap anything, it's just a matter of camera 
positioning/world layout.

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