Jump to content
  • Advertisement
Sign in to follow this  
Tommato

aglSetWindowRef chopping

This topic is 2638 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All

There is a small but annoying problem: aglSetWindowRef clears viewport with background color (with second parameter NULL as well).
As a result window is redrawn "part by part", irritating user.
I've tried

- glViewPort, glScissor, CGCaptureDisplay, EnableScreenUpdates (all has no effect)

- set AGL_BUFFER_RECT to empty (or just call aglDestroyContext without aglSetWindowRef) does same unwanted cleanup.

Any idea?

Thanks
Tom

Share this post


Link to post
Share on other sites
Advertisement
What do you mean by being redrawn part by part ? aglSetWindowRef should only be called once during initialization. It is possible that the window contains unspecified data after it has been called. This is why you should glClear the surface after the context was assigned to a window. Again, this is not an issue since this assignment is only done once during initialization.

According to AGL docs, aglSetWindowRef does not accept NULL as second parameter. It needs a valid WindowRef.

And finally, you should drop Carbon and AGL altogether. They are extremely obsolete and will never be updated anymore. Use Cocoa instead. Yes I know that this is annoying (especially due to ObjC), but that's the way it is.

Share this post


Link to post
Share on other sites
Hello Yann

a) User can select: either view oiginal texture image OR how it's mapped on 3D model (in same window), thus I cannot avoid context create/destroy

b) Is NULL param valid or not = not principal, because aglDestryContext and changing AGL_BUFFER_RECT produce same effect exactly

c) I realize Cocoa is a way to go but who would help me to port app > 1800 cpp files? :rolleyes:

Thanks
Tom

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!