Hi Hagai? Hanan?  Could you sign with the name so we know how to address you :-)

On 30 July 2013 08:41, Hagai Hanan <[email protected]> wrote:
> I also tried posting on the forums but they seem out of order.

I will raise a disucssion about the issues this week.  Previous
problems have been down to lack of volunteers to moderate the forum so
it could be the same problem.  I don't personally manage the forum,
just the mailing list so I can't directly influence it, it's really
down to the community to support it.

> I'm trying to render a scene onto a UIView that's part of a
> UIViewController, so that I can have iOS UI overlay on top of the OSG view.
>
> I tried to achieve this by using the GraphicsWindowIOS class and binding it
> to my internal view. This works fine except for one issue, the scene seems
> stretched horizontally (in landscape orientation), even though its rendered
> at fullscreen and there's no resizing happening.
>...

My guess is that you aren't setting the Camera's projection matrix to
fit the aspect ratio of your window and will just be getting the
defaults.  The Camera::setProjectionMatrixAsPerspective(..) method is
what controls the views aspect ratio, from the include/osg/Camera
header:

     /** Create a symmetrical perspective projection, See OpenGL
gluPerspective documentation for further details.
          * Aspect ratio is defined as width/height.*/
        void setProjectionMatrixAsPerspective(double fovy,double aspectRatio,
                                              double zNear, double zFar);

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to