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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:55:37+00:00 2026-06-04T13:55:37+00:00

I am running the boiler plate OpenGL example code that XCode creates for an

  • 0

I am running the boiler plate OpenGL example code that XCode creates for an OpenGL project for iOS. This sets up a simple ViewController and uses GLKit to handle the rest of the work.

All the update/draw functionality of the application is in C++. It is cross platform.

There is a lot of framebuffer creation going on. The draw phase renders to a few frame buffers and then tries to set it back to the default framebuffer.

glBindFramebuffer(GL_FRAMEBUFFER, 0);

This generates an GL_INVALID_ENUM. Only on iOS.

I am completely stumped as to why. The code runs fine on all major platforms except iOS. I’m wanting to blame GLKit. Any examples of iOS OpenGL setup that do not use GLKit?

UPDATE

The following snippet of code lets me see the default framebuffer that GLKit is using. For some reason it comes out as “2”. Sure enough if I use “2” in all my glBindFrameBuffer calls it works. This is very frustrating.

[view bindDrawable ];

GLint defaultFBO;
glGetIntegerv(GL_FRAMEBUFFER_BINDING_OES, &defaultFBO);
LOGI("DEFAULT FBO: %d", defaultFBO);  

What reason on earth would cause GLKit to not generate its internal framebuffer at 0? This is the semantic all other implementations of OpenGL use, 0 is the default FBO.

  • 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-04T13:55:39+00:00Added an answer on June 4, 2026 at 1:55 pm

    On iOS there is no default framebuffer. See Framebuffer Objects are the Only Rendering Target on iOS. I don’t know much about GLKit, but on iOS to render something on screen you need to create framebuffer, and attach to it renderbuffer, and inform Core Animation Layer that this renderbuffer will be the “screen” or “default framebuffer” to draw to. Meaning – everything you’ll draw to this framebuffer, will appear on screen. See Rendering to a Core Animation Layer.

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

Sidebar

Related Questions

Running the static analyzer on this piece of code: - (id) readForeignPref { CFPropertyListRef
I'm running a full code analysis on my project, and it says it has
Running this code on my linux mint 11 with Python 2.6 would normally lead
Running the following code, I get a StackOverflowError at the getPackage() line. How can
I recently started maintaining an old EJB2 application running on OC4J. That includes EJB
I'm running into an issue that seems to only appear on Windows 7. It
Running this query in the SQLManagement studio returns a result set of 162 Rows
Running the following code in Delphi XE2 Win32 platform works. However, the same code
Running tomcat, i have this folder hierarchy: - manager/ - ROOT/ - doc -
Running Safari 5.05. This CSS is looks fine in Chrome and Firefox, but when

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.