Re: [osg-users] osgText::Text and screen

2014-07-19 Thread Bram Vaessen
I had the exact same issue, but I tried to flip the view matrix as suggested, but I must be doing something wrong, because I don't see anything when I try this: Code: camera-setViewMatrix(camera-getViewMatrix() * osg::Matrixd::scale(1,-1.f,1)); Can anyone tell me the right way to flip the

[osg-users] osgText::Text and screen

2010-07-27 Thread Peter Wraae Marino
Hi osgUsers, I'm trying to create a gui and would like to have my coordinates system 0, 0 at the upper, left of the screen. To do this I decided to create a matrix that has an ortho view as follows: osg::Matrix::ortho2D( 0, viewW, viewH, 0) where viewH is bottom and top has zero This works

Re: [osg-users] osgText::Text and screen

2010-07-27 Thread Robert Osfield
Hi Peter, If you are using an orthographic projection then you will just need to align the text to the XY plane, which is the default, there is no need to set the AxisAlignment to SCREEN. It's likely upside down as you've inverted the coordinates w.r.t OpenGL. Robert. On Tue, Jul 27, 2010 at

Re: [osg-users] osgText::Text and screen

2010-07-27 Thread Peter Wraae Marino
Hi Robert, I've removed the AxisAlignment... the text is the same. the reason for it being upside down is because of my ortho matrix.. I've set bottom to the pixel height of the view and top to zero. this way I get a coordinate system for the gui that is in the upper, left regards, Peter On

Re: [osg-users] osgText::Text and screen

2010-07-27 Thread Robert Osfield
Hi Peter, Try flipping the view matrix. Robert. On Tue, Jul 27, 2010 at 11:31 AM, Peter Wraae Marino marino.pe...@gmail.com wrote: Hi Robert, I've removed the AxisAlignment... the text is the same. the reason for it being upside down is because of my ortho matrix.. I've set bottom to the

Re: [osg-users] osgText::Text and screen

2010-07-27 Thread Peter Wraae Marino
Hi Robert, yep.. did that .. .did a -1 scaling on the y-axis... works like a charm now. thanks, Peter On Tue, Jul 27, 2010 at 1:43 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Peter, Try flipping the view matrix. Robert. On Tue, Jul 27, 2010 at 11:31 AM, Peter Wraae Marino