Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HIView and OpenGL



On Friday, May 30, 2003, at 05:07 AM, Dario Accornero wrote:

On Thursday, May 29, 2003, at 21:25 Europe/Paris, Michael Wolfinbarger wrote:

Maybe I'm doing something wrong. In my experience, if my OpenGL view is embedded within another control (e.g. a group box), and the OpenGL view is hanging over one or more sides of the group box, then it doesn't get clipped to the bounds of the group box unless I set the AGL_CLIP_REGION accordingly.

Even if you set your buffer rect to cover exactly the bounds of your view? Are you sure the coordinates you pass to AGL_BUFFER_RECT are correct? Are you sure your view bounds are completely contained within the parent view?

No, it's not necessarily completely contained within the parent view. That's the case I was trying to handle with the clip region. But I see now that it would be more efficient to just handle that with the buffer rect as well.

I guess I still have the problem of the parent bounds changing out from under me. If I'm not completely contained within the parent, and I want to be clipped to it, then I'll need to change my buffer rect whenever my parent's bounds are changed. I'll get a kEventControlBoundsChanged if I'm resized, but not if my parent is resized. The only way I see to handle that is to install kEventControlBoundsChanged handlers all the way up the view hierarchy.

Thanks for your help. I'm starting to understand AGL and OpenGL a little better now.

wolfie
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: HIView and OpenGL (From: Dario Accornero <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.