Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8053575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:53:36+00:00 2026-06-05T07:53:36+00:00

According to Apple’s documentation, CGLFlushDrawable or it’s Cocoa equivalent flushBuffer may behave in couple

  • 0

According to Apple’s documentation, CGLFlushDrawable or it’s Cocoa equivalent flushBuffer may behave in couple different ways. Normally for a windowed application the contents of a back buffer are copied to the visible buffer like it’s stated here:

CGLFlushDrawable

Copies the back buffer of a double-buffered context to the front buffer.

I assume the contents of the drawing buffer are left untouched (see question 1.). Even if I’m wrong, it can be assured by passing the kCGLPFABackingStore attribute to CGLChoosePixelFormat.

But further reading reaveals, that under some circumstances the buffers may be swapped rather than copying being performed:

If the backing store attribute is set to false, the buffers can be exchanged rather than copied. This is often the case in full-screen mode.

And also this states

When there is no content above your full-screen window, Mac OS X automatically attempts to optimize this context’s performance. For example, when your application calls flushBuffer on the NSOpenGLContext object, the system may swap the buffers rather than copying the contents of the back buffer to the front buffer. (…) Because the system may choose to swap the buffers rather than copy them, your application must completely redraw the scene after every call to flushBuffer.

And here go my questions:

  1. If the back buffer is copied, is it guaranteed, that it’s contents are preserved even without the backing store attribute?
  2. If the bufferse are swapped, does the back buffer get contents of the front buffer, or is it undefined so it could as well get random stuff?
  3. The system may choose to swap buffers, but is there any way to determine if it actually did choose to do so?
  4. In any of those cases, is there a way to determine if the buffer was preserved, exchanged with the front buffer or got messed up?

Also any information on how it is made in WGL, GLX or EGL would be appreciated. I particulary need the answer to the question 4.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T07:53:37+00:00Added an answer on June 5, 2026 at 7:53 am
    1. No, it’s not guaranteed.
    2. It might be random.
    3. No, I don’t believe so.
    4. No. If you don’t specify kCGLPFABackingStore or NSOpenGLPFABackingStore, then you can’t make any assumptions about the contents of the back buffer, which is why the docs say you must redraw from scratch for every frame.

    I’m not sure what you’re asking about WGL, GLX, and EGL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to Apple's documentation here , this should work in my code: @interface Menu
According to Apple's documentation on the View Controller Lifecycle I noticed the following regarding
I'm trying to use CGBitmapContextCreate . According to Apple's documentation the ApplicationServices framework is
According to Apple's documentation , in order to make phone call from my app,
According to Apple documentation on debugging Core Data it says we should be able
According to Apple's documentation , @font-face is deprecated for use on the iPhone version
According to Apple's ARC Documentation , there are a fairly significant number of changes
According to Apple's documentation , NSOutlineView requires each item in the view to be
According to Apple's documentation, setAlwaysUsesMultipleValuesMarker: Sets whether the receiver always returns the multiple values
i have a application i put Default.png for splash screen according to apple's documentation.the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.