HI all,
I have now resolved the issue. I am not sure exactly what the PBO issue was but
I suspect I failed properly clean my build.
The artefacts were present as it seems that the default behaviour of PRE_RENDER
cameras has changed with respect to their clear masks.
To fix my issue all I had to do was explicitly tell each of my PRE_RENDER
cameras to clear the depth and colour buffers.
Cheers,
Brad
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christiansen,
Brad
Sent: Thursday, 25 March 2010 10:59 AM
To: osg-users (osg-users@lists.openscenegraph.org)
Subject: [osg-users] Error with pixel puffer in trunk
Hi all,
I know this isn't much info to go on but, I have just updated my OSG release
from 2.9.5 to yesterdays trunk. Since the update, in my application, which is
based on the MFC example (though my native window handle comes from Java) I am
getting some very 'interesting' visual artefacts and the following error (about
10 times on start-up, then every time I resize the window or do the RTT):
no PixelBufferObject , pbo=
As far as I am aware I am never even requesting a PBO.
The artefacts I am seeing are related to two (extra) cameras I have in the
scene. Both cameras are pre-render, one renders a star field with a very large
far plane value (the depth buffer is then cleared by the main camera) and the
second camera does a RTT which is projected onto the globe. I am seeing the
objects rendered by the cameras but they do not seem to be doing the correct
clear operations. I have not modified any of my code, just simply re-built it.
I have attached a screen shot to demonstrate the artefacts.
I have no idea where to look to track down the issue. Any suggestions would be
greatly appreciated.
I am setting up the graphics context exactly as I was before:
RECT rect;
// Get the current window size
::GetWindowRect(hwnd, rect);
// Init the GraphicsContext Traits
osg::ref_ptrosg::GraphicsContext::Traits traits = new
osg::GraphicsContext::Traits;
// Init the Windata Variable that holds the handle for the Window to
display OSG in.
osg::ref_ptrosg::Referenced windata = new
osgViewer::GraphicsWindowWin32::WindowData(hwnd, true);
// 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-doubleBuffer = true;
traits-sharedContext = 0;
traits-setInheritedWindowPixelFormat = true;
traits-inheritedWindowData = windata;
osg::GraphicsContext* gc =
osg::GraphicsContext::createGraphicsContext(traits.get());
m_viewer-getCamera()-setGraphicsContext(gc);
m_viewer-setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
Cheers,
Brad
DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or
copyright material or information that is subject to legal professional
privilege. They are for the use of the intended recipient only. Any
unauthorised viewing, use, disclosure, copying, alteration, storage or
distribution of, or reliance on, this message is strictly prohibited. No part
may be reproduced, adapted or transmitted without the written permission of the
owner. If you have received this transmission in error, or are not an
authorised recipient, please immediately notify the sender by return email,
delete this message and all copies from your e-mail system, and destroy any
printed copies. Receipt by anyone other than the intended recipient should not
be deemed a waiver of any privilege or protection. Thales Australia does not
warrant or represent that this e-mail or any documents, files and previous
e-mail messages attached are error or virus free.
--
DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or
copyright
material or information that is subject to legal professional privilege. They
are for
the use of the intended recipient only. Any unauthorised viewing, use,
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without
the
written permission of the owner. If you have received this transmission in
error, or
are not an authorised recipient, please immediately notify the sender by return
email,
delete this message and all copies from your e-mail system, and destroy any
printed
copies. Receipt by anyone other than