CGL , AGL and Custom Views.

Post: #1
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.

Quote this message in a reply
Posts: 1,563
Joined: 2003.10
Post: #2
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
Quote this message in a reply
Post: #3
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.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Implementing page views. MacSteve85 2 4,569 Jan 20, 2010 12:09 AM
Last Post: mysteriouspants