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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:19:13+00:00 2026-05-13T06:19:13+00:00

I notice that the default data type for texture coordinates in the OpenGL docs

  • 0

I notice that the default data type for texture coordinates in the OpenGL docs is GLfloat, but much of the sample code I see written by experienced iphone developers uses GLshort or GLbyte. Is this an optimization?

GLfloat vertices[] = {    
  // Upper left
  x1, y2,
  // Lower left
  x1, y1,
  // Lower right
  x2, y1,
  // Upper right
  x2, y2,
};
glTexCoordPointer(2, GL_FLOAT, 0, iconSTs);

vs.

GLbyte vertices[] = {    
  // Upper left
  x1, y2,
  // Lower left
  x1, y1,
  // Lower right
  x2, y1,
  // Upper right
  x2, y2,
};
glTexCoordPointer(2, GL_BYTE, 0, iconSTs);
  • 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-13T06:19:13+00:00Added an answer on May 13, 2026 at 6:19 am

    I don’t recommend using byte/short cordinates on iPhone, especially if you’re a beginner. Just use floats. They take more space, but it doesn’t matter until you need to render thousands of vertices at maximum speed. Also, you’ll have to change texture matrix to represent fractional values with integer texture coords, otherwise they’ll only point to texture corners (0, 1). This adds complexity to your code.

    I believe they are NOT faster by themselves, at least on iPhone. They can be somewhat faster because of smaller memory bandwidth necessary to read thousands of them in a single call. This optimization isn’t worth doing if you writing your first engine. Unless you are a very experienced engine coder and going to push the hardware to its limits, this will never be the main bottleneck in your code, bringing negligible performance benefits.

    Situation can probably be different for some other OGL-ES devices, since OpenGL pipline is partially implemented in software and some devices lack FPU and therefore unable to process floats quickly. That’s why some Android games try to avoid float type altogether (in 2009).

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

Sidebar

Ask A Question

Stats

  • Questions 278k
  • Answers 278k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You should have a common interface. class Column<T>: public IColumn… May 13, 2026 at 3:16 pm
  • Editorial Team
    Editorial Team added an answer The details are implementation dependent but generally speaking, results are… May 13, 2026 at 3:16 pm
  • Editorial Team
    Editorial Team added an answer Uri uri = new Uri("http://www.mysite.com/home/../help/helppage.aspx"); uri.AbsoluteUri; // <- Contains http://www.mysite.com/help/helppage.aspx May 13, 2026 at 3:16 pm

Related Questions

I've been tasked with automating the collection of some reports from our remote locations.
When reading data from the Input file I noticed that the ¥ symbom was
So, I have an autocomplete dropdown with a list of townships. Initially I just
Answers provided have all been great, I mentioned in the comments of Alnitak's answer
I'm working on a encryption functionality based on classes inherited from SymmetricAlgorithm such as

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.