[osg-users] Anti-Aliasing and MultiSampling.
Ümit Uzun
umituzun84 at gmail.com
Thu Mar 5 13:49:42 PST 2009
Hi Folks,
I have searched about anti-aliasing. There some choices to implement
Anti-Aliasing. And I have choosed multiSampling.
// Get the current window size.
::GetWindowRect(hWnd, &rect);
// Init the GraphicsContext Traits.
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new
osg::GraphicsContext::Traits;
// Init the Windata Variable that holds the handle for the Window to
display OSG in.
osg::ref_ptr<osg::Referenced> windata = new
osgViewer::GraphicsWindowWin32::WindowData(hWnd);
// Setup the traits parameters.
traits->x = 0;
traits->y = 0;
traits->width = rect.right - rect.left;
traits->height = rect.bottom - rect.top;
traits->windowDecoration = FALSE;
traits->useCursor = FALSE;
traits->doubleBuffer = TRUE;
traits->sharedContext = 0;
traits->setInheritedWindowPixelFormat = TRUE;
traits->inheritedWindowData = windata;
// traits->samples = 4; // smoothing
In my application, I have set traits->samples to 4 and rendering much
better before. But when I set traits->samples to 16 screen getting full
screen and flooding the related Hwnd picture control box. I am using MFC
based dialog.
I am curios about flooding Hwnd and getting uncontrolled full screen mode.
And If you know much better way to make my screen AntiAliased, please let me
know.
Best Regards.
--
Ümit Uzun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090305/72308ce7/attachment-0002.htm>
More information about the osg-users
mailing list