Hi, I was just wondering what is required when resizing a window. I've done this with Direct3D, and what it does is basically take your front buffer surface and then it stretch blits it to the client area of your window. If you want to avoid distortion when the aspect ration changes, you must, at a minimum, change your perspective matrix to reflect the new aspect ratio. Ideally, you would also change the dimensions of your front/back buffers to exactly match the size of your client area, but this was a bit more complicated as it required resetting the device (which, in turn, requires unloading and re-loading some of your resources, if applicable).
Ok, so I haven't yet dealt with this issue in OpenGL. Would it require changing the rendering context, or possibly deleting it and creating a new one? I'm not sure, but I guess that is moot because I'm working with OSG and therefore those details are probably abstracted away to that extent. So I guess I'm just wondering how I could do this with OSG. In this case, I am not having OSG launch the window for me. Instead, I have a Panel control in an already-existing application that I'm using to display the rendered scene. To do this, I am passing the Panel's HWND to a WindowData object, and then assigning that object to the inheritedWindowData member of the Traits object that I use to create the graphics context. It works fine, but the image seems stretched horizontally, so I'd like to be able to fix that. Interestingly, I can't seem to 'fix' the stretching by resizing the Panel, which may be an indication that OSG, or something, is doing the aforementioned adjustments automatically, but in doing so, maintains the original aspect ratio, which as I said, results in a stretched image. Thank you! Cheers, Frank ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23080#23080 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

