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

  • Home
  • SEARCH
  • 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 5950121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:20:55+00:00 2026-05-22T17:20:55+00:00

I have a problem with openGL and orientation in my iPad app. The problem

  • 0

I have a problem with openGL and orientation in my iPad app. The problem only happens with 4.3+ devices. It doesn’t happen with 4.2 devices.

When I start the application with any orientation and draw, it draws correctly, but when I change the orientation, and try to draw, the iPad restarts itself. The restart happens on the call

[context presentRenderbuffer:GL_RENDERBUFFER_OES];

This is the code I use in layoutSubviews:

-(void) layoutSubviews {
    [EAGLContext setCurrentContext:context];

    glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
    [context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(id<EAGLDrawable>) [self layer]];

    glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
    glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);

    glScissor(0, 0, [self bounds].size.width, [self bounds].size.height);

    NSLog(@"%f -  %f", [self bounds].size.width, [self bounds].size.height);

    glBindRenderbufferOES(GL_RENDERBUFFER_OES, depthRenderbuffer);
    glRenderbufferStorageOES(GL_RENDERBUFFER_OES, GL_DEPTH_COMPONENT16_OES, backingWidth, backingHeight);

    [self erase];
    [self drawExisting];

    glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
    [context presentRenderbuffer:GL_RENDERBUFFER_OES];
}

My question is, did anything change is 4.3? I cant find anything that states that. Or if you see anything wrong in my code, please let me know.

  • 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-05-22T17:20:56+00:00Added an answer on May 22, 2026 at 5:20 pm

    I solved this problem by destroying and then creating the buffer in layoutSubviews. This caused some new minor issues that I was able to fix. The destroy and create methods are from here:
    http://box2d.googlecode.com/…/Box2DView.mm

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

Sidebar

Related Questions

I have this problem that when there is an OpenGL application I am working
I have a problem with lighting in my OpenGL application. When one of the
I have a problem using opengl on android to draw a simple rectangle. This
I have this problem. Any idea? from OpenGL.raw.GLUT import * File /usr/lib/python2.6/site-packages/OpenGL/raw/GLUT/__init__.py, line 6,
I have a problem with incorrect alpha blending results with openGL ES on iPhone.
I have written a game that uses GLUT, OpenGL and FMOD. The problem is
I have a problem somehow similar to this post : glTexGen in OpenGL ES
I seem to have a curious problem. I set up OpenGL like this: glViewport(0,
I have a problem to load more than one file. Obj in OpenGL. I
I have a problem that I'm trying to optimize. I'm reproducing OpenGL functions and

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.