Anyway...
After rendering the first frame with no errors (Windows or OpenGL, I'm
checking error codes all over the place :-)), I end up back in my
display procedure, at which point I try and do a wglMakeCurrent() (which
worked quite happily the first few times). The call fails this time,
though, and if I call the Windows routine for getting the last error, it
says that it's error code 2000, which is "pixel format is invalid.".
so... I'm a complete Windows novice, and am wondering what are the
sorts of things I might have done to invalidate my pixel format, because
goodness knows, I didn't mean to...
I'm running WindowsNT4 (SP3), VisualC++ 5 (SP2), SGI's OpenGL MR2, and
ELSA's GLoria Synergy card (although I've run this on both the hardware
assisted and non-hardware assisted versions, same problems).
Any leads would be appreciated.
--
--> Michael B. Johnson, SMVS, Ph.D. -- wa...@pixar.com
--> Media Arts Technologist, Pixar Animation Studios (Eastern Office)
--> alumnus, MIT Media Lab, Computer Graphics & Animation Group
--> http://wave.www.media.mit.edu/people/wave/
"If hdc references a window, calling the SetPixelFormat function also
changes the pixel format of the window. Setting the pixel format of a
window more than once can lead to significant complications for the
Window Manager and for multithread applications, so it is not allowed.
An application can only set the pixel format of a window one time. Once
a window’s pixel format is set, it cannot be changed."
Hope this helps. Richard Horne
>> I have encountered similar problems related to calling SetPixelFormat
>> serveral times for the same window. I don't know if this is your
>> situation, but it does cause the same symptoms. I quote from the
>> VC++ 5.0 documentation for SetPixelFormat...
>>
>> "If hdc references a window, calling the SetPixelFormat function also
>> changes the pixel format of the window. Setting the pixel format of a
>> window more than once can lead to significant complications for the
>> Window Manager and for multithread applications, so it is not allowed.
>> An application can only set the pixel format of a window one time. Once
>> a window’s pixel format is set, it cannot be changed."
One other thing to check is the WNDCLASS flags - be sure to set the
CS_OWNDC flag. This is sometimes responsible for seemingly random
failures in MakeCurrent and SwapBuffers.
I'm getting the same error when I run the VASPHERE.C sample code from the
MSSDK linked to the SGI OpenGL Release 2 implementation, and use the
OverrideDispatch to force the pipeline to run through the SGI
implementation. On the other hand, linked through OpenGL32 or with the
OverrideDispatch registry key set so that the rendering is done by the MCD,
and it works just fine.
Wilbur