> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of David Johansson
> Sent: 08 May 2006 14:11
> To: osg users
> Subject: Re: [osg-users] Cant set pixel format.
> 
> Im using 32-bit color in windows.
> Or is there another place to set it up that im not aware of?
> 
> David
> 
...
> > I was wondering about the "Can't set pixel format" problem that i am
> having.
> > Sometimes i get this error, allmost everytime, but on rare occations i
> > don't.
> > Usually when i restart the program (after it workt) it just keeps
> > giving me this error-message.
> >

David,

I understand that you are working in a win32 environment. If not ignore this
message!

Are you letting Producer create a window for you or are you passing a window
handle in? If you are passing a handle in, make sure that window has a class
style of CS_OWNDC, this makes the window use a private DC. Common (non
private) device contexts are independent of processes and can sometimes get
messed up, requiring a reboot! Also ensure that WS_CLIPCHILDREN and
WS_CLIPSIBLINGS are set on the window. Remember that you can only call
SetPixelFormat on a DC once in its entire lifetime!

I am also assuming that the error is being displayed because of the call to

            doInternalError("Can't Set The PixelFormat.");

in RenderSurface_Win32.cpp. In which case the other information displayed in
the error window would be useful to help diagnosis.

Roger


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to