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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:31:43+00:00 2026-05-30T23:31:43+00:00

I was looking at the template for OpenGL ES 2.0 in Xcode, and I

  • 0

I was looking at the template for OpenGL ES 2.0 in Xcode, and I noticed that Apple creates a new Perspective Matrix and a new Transform Matrix before every frame. I also see this in tutorials. When I use OpenGL on other platforms, I only have to create the Matrices once. Why does Apple want you to make a new one every frame?

  • 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-30T23:31:44+00:00Added an answer on May 30, 2026 at 11:31 pm

    In a complex application, there are a few ways to deal with OpenGL state:

    1) Have a policy where every function or method that changes OpenGL state must set it back to what it was before they did anything

    2) Every function or method sets the state to what they want it to be assuming nothing about the existing state

    3) You keep track of the state and functions and methods can check it locally and set only what they need to

    In case 1, if someone forgets to follow the policy, bugs occur and are hard to track down. Also, getting the current state can be expensive for certain bits of state.

    In case 2, you spend time setting state you might not need to. This is usually not too bad, though.

    In case 3, you expend a lot of effort and memory tracking the state that OpenGL is already keeping. It’s expensive and error-prone.

    So usually, I go with #2. It’s the least amount of work for me and has reasonably good performance in most cases. Your mileage may vary.

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

Sidebar

Related Questions

I am looking for template/generator libraries for C++ that are similar to eg. Ruby's
XCode's OpenGL template seems to be cheating to solve this stretched viewport problem I've
I am looking for a new Javascript template engine to replace old jQuery Template
I am looking for a template for hash map that i can rely on,
I am looking for a template solution that can work on both server side
I'm looking for a simple Template engine that works both on client side with
I'm looking at the ComboBox template . I have a StoryBoard that I'm creating
I am looking at C++ code that looks like this : template<class A> bool
Looking at using a template system for a new project, it's only a small
I am looking for CSS template that has the following properties: Website title, menu

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.