Hi Dirk,

> > Of course I know that, and I have no idea why it is missing in the
> original
> > code (not my code btw). The other thing you might want to think about
> is: If
> > the code does not work with CS_OWNDC not being set, why not get rid
> of
> > ReleaseDC altogether? You know that you don't need to call ReleaseDC
> when
> > CS_OWNDC is set.
> 
> I didn't know that, actually. ;) As you probably figured by now, we're
> now
> hardcore Windows people. I took the code for the Win32Window from the
> simplest
> OpenGL example I could find, but the whole HDC/HGLRC/Handle magic has
> always
> escaped me. So if you have a cleaner way to handle that, we'd be happy
> to get
> some comments/patches.

Yes I figured as much ;-)
No problem. I will submit patches as soon as I find enough time to do it.
Windows programming is my expertise and I will try to help where I can. BTW
there is no magic behind the HDC/HGLRC/HWND stuff, just think of them as of
pointers (which they are afaik, that's why 64bit handles are 64bit in
size...) which refer to some unknown data structures, just as void* do. It's
just a little bit confusing that you need three of them instead only one,
but it actually makes sense as they serve completely different purposes and
therefore belong to different drivers.

> The main complication (and the main reason for having Window-system
> specific
> Windows in the first place) is that we want to be able to have separate
> threads
> to handle input and drawing (i.e. have a separate drawing thread that
> just pumps
> OpenGL). That is not the usual way most apps work, so it took me quite
> a while
> to make it work, and I just like not to lose it.

I did that once, in an ATL/WTL framework, and it is not easy to do. But it
can be done and it can work really stable when done carefully.

Aloha, Andi


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to