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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:12:41+00:00 2026-06-12T10:12:41+00:00

I am working on a game where the rendering is done using GLKit. In

  • 0

I am working on a game where the rendering is done using GLKit. In order to save some work in creating UI layouts, I am using Interface Builder and UIKit views to manage the showing/hiding and interaction of certain interface elements.

Recently I made some structural changes that resulted in two fullscreen views containing my button overlays on top of the GL view, and this has hurt the rendering framerate on some slower devices such as iPhone 4 and 4th Gen iPod Touch. I did this to make it easier to show/hide full control layouts all at once using the existing IB/UIKit architecture.

Old:

|-Root (GLKView)
|  |-Buttons

New:

|-Root  (GLKView)
|  |-Layout 1
|  |  |-Buttons 1
|  |-Layout 2
|  |  |-Buttons 2
(Etc...)

The overlays (Layout 1, 2, …, n) are completely transparent, contain a few subviews (Buttons 1, 2, …, n) with images and text around the edges of the screen. The overhead for overlaying these few buttons and things was not as bad when the views were direct descendants of the root view, but with an extra transparent view in the middle seems to have added sapped my performance, as my framerate decreased a lot.

What sorts of options do I have for reducing overhead? There’s no animation or anything happening in the overlays, so I assume they shouldn’t be redrawing more than they need to, and it could just be the extra alpha-blended full-screen overlay that is sapping my performance.

I am setting the hidden properties on all of my UIViews every frame without checking whether they have changed, could that result in the views being flagged as needing a redraw?

Converting all these buttons to OpenGL drawing is possible since I’m not using iOS’s native controls like UIButtons and UISwitches (Just UIViews with images and labels), but I’d like to avoid it if I can.

  • 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-12T10:12:42+00:00Added an answer on June 12, 2026 at 10:12 am

    The cost emanates up from the OpenGL view rather than down from the buttons; when it changes everything on top needs to be recomposited.

    So in terms of a practical solution, how about ditching the layout views and using IBCollections instead? You’d definitely want to push changes the hidden flags only on actual changes to avoid array iterations but you’d get the same overall compositing costs as previously.

    So you’d declare something like:

    @property(retain) IBOutletCollection(UIView) NSArray *viewsInLayout1;
    

    You can then wire that to as many views as you like in the interface designer. Subsequently in code you’d have the array viewsInLayout1 that you could iterate through (or use makeObjectsPerformSelector: where possible) to differentiate one group from another without having to hardcode the groupings all over the place.

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

Sidebar

Related Questions

Working on game where plates will be falling from top to bottom. Some plates
Ahoy, I'm working on an OpenGL ES based game for Android using the NDK.
Working on a game where I'm using AudioUnits to generate sound effects. I've based
I'm currently working on a game/engine that uses OpenGL for rendering, and recently have
I'm working on creating a simple 3D rendering engine in Java. I've messed about
In a Silverlight game I'm working on I'm using an ItemsControl to display an
I'm working on a game (using Ruby) and planning to have it available in
I'm working on a 2D game with realistic deferred lighting. Since I'm rendering the
I working on a Game. The View, Thread and the Engine are done. Now
I am working on game application and i use AnimationDrawable for image change. but

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.