PDA

View Full Version : CGL , AGL and Custom Views.


anonuser
2004.09.23, 12:24 PM
Hi all.

This is what I'm looking to do, I want to create an OpenGL view inside of an existing window. I'm using Carbon so no Cocoa stuff. I assume I'd use a custom HIView but does anyone know the steps envolved in creating a custom view.

Also I'm not sure is better to use CGL, or AGL.

Thanks
Sean.
ありがとう。

ThemsAllTook
2004.09.23, 01:30 PM
As I understand, CGL knows nothing of window systems, and only allows you to create fullsccreen contexts. So if you're looking to put something in a window, AGL is probably your only choice.

I've never worked with HIViews, so I don't really know their capabilities. But setting up a custom HIView sounds like a lot more work than simply setting up an AGL context for the window, and setting the viewport appropriately. You might also have to set AGL_BUFFER_RECT to get the desired effect. I don't really know if AGL contexts play nice with controls, etc. in the same window... I'd be interested to know once you get this set up.

Alex Diener

anonuser
2004.09.24, 12:18 PM
yeah I was wondering about playing nice with controls because i need to drag between a custom view and an OpenGL view.

So AGL it is.