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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:24:24+00:00 2026-05-28T18:24:24+00:00

Ahoy! I’ve been looking into updating some old test code in an attempt to

  • 0

Ahoy!

I’ve been looking into updating some old test code in an attempt to brush up on the new features added to GLKit. So far i’ve managed to set up a GLKViewController and start rendering some basic shapes but have struggled to find any decent information regarding GLKBaseEffect.

The GLKBaseEffect documentation states:

At initialization time, your application first creates an OpenGL ES 2.0 context and makes it current. Then, it allocates and initializes a new effect object, configures its properties, and calls its prepareToDraw method. Binding an effect causes a shader to be compiled and bound to the current OpenGL ES context. The base effect also requires vertex data to be supplied by your application. To supply vertex data, create one or more vertex array objects. For each attribute required by the shader, the vertex array object should enable the attribute and point to data stored in a vertex buffer object.

What i’m struggling to discern is;

Do I need a GLKBaseEffect object for each “model” I’m rendering? Or do I use a single GLKBaseEffect for each “scene” and simply change the properties on the fly before calling prepareToDraw?

I’ve seen a few tutorials for game engines and renderers that simply use a single GLKBaseEffect for each model but this seems wholly inefficient if the same could be achieved with a single instance instead.

From reading the documentation it almost seems like this is the best approach but considering i’ve seen so many people using multiple instances, i’m starting to think that this isn’t the case.

Can anyone shed any light on this? GLKit is still fairly new to iOS (and to me) so any information would be greatly appreciated.

  • 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-28T18:24:25+00:00Added an answer on May 28, 2026 at 6:24 pm

    No, you should not create a unique GLKBaseEffect for each object. For example, if you are drawing a maze, each brick in that maze may be its own object, but they can all share the same GLKBaseEffect. Remember though, that GLKBaseEffect also stores information in location as well as texture, lighting, fog etc. So if you want to draw the bricks in more than one place (which I assume you do 🙂 you tweak their transformation matrix and then call the ‘prepareToDraw’ API.

    I agree we need more tutorials written by folks who have used GLKBaseEffect extensively to get more information on Best Practices for this new framework.

    Happy sailing..

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

Sidebar

Related Questions

Ahoy hoy everyone :) Here is a list of links. You will need it
Ahoy, I'd like to mount a virtual drive myself on Windows XP, I guess
Ahoy, I'm working on an OpenGL ES based game for Android using the NDK.
Ahoy! I'm trying to create a reusable UIView (for various reasons) similar to the
Ahoy all! Long story short with this one if you don't mind lending a
I have an LPTSTR for a file path, i.e. C:\Program Files\Ahoy . I would
I have a simple Sinatra app that I am playing with, and for some
Ahoy! I was wondering if there's a way to configure eclipse not to open
I've been using heavily Prototype's way of defining classes and subclasses: // properties are
Ahoy Stack Overflow! This be mai first post... I'm attempting to identify users with

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.