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 7776521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:54:22+00:00 2026-06-01T17:54:22+00:00

When a GLKView is resized, there are some behind-the-scenes operations that take place on

  • 0

When a GLKView is resized, there are some behind-the-scenes operations that take place on the buffers and context of that GLKView. During the time it takes to perform these behind-the-scenes operations, drawing to the GLKView does not produce correct results.

In my scenario, I have a GLKView that has setNeedsDisplay enabled, so that anytime I need to update it’s contents on screen, I just call -setNeedsDisplay on that
GLKView. I’m using GLKView to draw images, so if I need to draw an image with a different size, I need to also change the size of the GLKView.

The problem: When I change the size of the GLKView and call setNeedsDisplay on that view, the result on screen is not correct. This is because the GLKView is not done finishing the behind-the-scenes operations invoked by the new size change before it tries to draw the new image.

I found a work-around to this by calling: performSelector:@selector(setNeedsDisplay) withObject:nil afterDelay:0 instead of just setNeedsDisplay on the GLKView. This basically forces the main thread to wait for all the behind-the-scenes openGL operations to be completed before calling setNeedsDisplay. Although this works ok, I am wondering if there is a better solution. For example, is there an openGL call to make the thread wait for all openGL operations to be completed before continuing?

  • 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-01T17:54:23+00:00Added an answer on June 1, 2026 at 5:54 pm

    The solution was to reset the CIContext object after the GLKView has been resized.

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

Sidebar

Related Questions

Hope there are some GLKViewController experts out there because I have some problems :)
I'm using GLKit's GLKViewController/GLKView to do some basic OpenGL drawing. I'd like to setup
I'm looking for a sample application that uses Apple's new GLKView object whith other
For some reason, my variable filename changes by the time it gets to setupView
I've created an OpenGL ES game which is being rendered using a GLKView on
I'm drawing a line using OpenGL on the iPhone. I used GLView and GLKView
I have a C++ object that I'm getting the reference to in my view
Summary: exporting pixel data from NSOpenGLView to some file formats gives incorrect colours I
If I create a GLKView in interface builder I see several configurable properties related
I'm trying to apply some CIFilters to a sequence of CIImage and would like

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.