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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:25:28+00:00 2026-05-25T21:25:28+00:00

I read in this Apple documentation (under the header Avoid Storing Constants in Attribute

  • 0

I read in this Apple documentation (under the header “Avoid Storing Constants in Attribute Arrays”) it says that if a model’s vertices all have the same colour then colour shouldn’t be a vertex attribute. What do they mean by “OpenGL ES 2.0 applications can either set a constant vertex attribute…”?

My question is, is it better to use a uniform value for colour, and call have a uniform call and draw call for every object? Or to have the vertex attribute anyway, but draw everything in one fell swoop. (Or, a constant vertex attribute if that’s better).

Basically, is the advantage of drawing everything at once only the lack of overhead of multiple function calls?

Just to get a sense of it, say I were drawing 1000 circles every frame, each a different colour and having 40 vertices. Which would be better in that case?

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

    The answer depends on how much stuff you are drawing in a single draw call. If you have an object of 30,000 vertices, where all of them have the same color, then you’re wasting a lot of per-vertex reads (assuming that the color data makes your per-vertex data bigger. It may not). However, if you’re talking about quad rendering, where each quad has a different color, then the uniform update overhead and multiple draw calls is going to kill your performance.

    Note that there are methods for instancing under OpenGL, which allows you to have per-instance data as well as per-vertex data. But this generally doesn’t buy much until you have multiple thousands of instances, and more than 100 vertices in the model.

    For your specific example, there’s no way to know which would be faster. You’d have to benchmark it.

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

Sidebar

Related Questions

I've read apple documentation to assert that I was doing the memory management correctly
I read somewhere in apple documentation that I need to edit the plist to
I've read the Apple Push Notification documentation and it seems this isn't possible but
I have read in the Apple Documentation that StoreKit will not restore subscriptions on
after read this article i tried generate EF model by System.Diagnostics.Process: Process myProcess =
I HAVE READ apple documentation and it's not understandable for such a beginner in
I've just read Apple documentation for NSScanner . I'm trying to get the integer
I have read the Apple documentation. They list the apps registered, yet in their
I read in the apple documentation about copyWithZone : The returned object is implicitly
I read the Apple documentation on how to make use of the DOM events

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.