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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:23:41+00:00 2026-06-13T09:23:41+00:00

Possible Duplicate: Rendering meshes with multiple indices This is about using index buffers to

  • 0

Possible Duplicate:
Rendering meshes with multiple indices

This is about using index buffers to render custom geometry, like from an OBJ file. I know a bit about 3d graphics conventions, but I haven’t done much of anything with WebGL.
The short form of my question is “how do you use Index Buffers in WebGL?”

What I would like to do is, for a piece of custom geometry, build a list of the position vectors at play, and a list of the UV vectors at play (lets skip the normals). Then, when I go to draw the triangles, I just want to define each triangle with pointers to three of the existing position vectors, and pointers to three existing UV vectors. (simply because that’s how OBJ’s are set up)

From what I’ve read (I swear I googled this a hundred different ways and couldn’t get a conclusive answer), you have to lump the UV and the position together as a vertex, and then the triangles are defined as pointers to three of these verticies. But what happens when the list of UVs is a different length than the list of positions?

Lets say I have a cube. That’s eight position vectors. But given that each face has the same, square UV layout (each side should look the same when rendered). That’s four (unique) UVs. Now what?

It’s like I have to abandon this method, bite the bullet, and for all 12 triangles, define each position and UV– at the “cost” of repeating position vectors along the cube edges and repeating uvs along the face diagonals. If this is the accepted practice, that’s fine, I just want to be sure I’m going about this the right way.

  • 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-13T09:23:42+00:00Added an answer on June 13, 2026 at 9:23 am

    Your arrays containing vertex positions, texture coordinates, normals, etc. must be the same length. That means redundant data in many cases. A cube is one example where the redundancy is especially bad. You’ll actually have to pass in 24 vertices, and 24 texcoords.

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

Sidebar

Related Questions

Possible Duplicate: Difference of create Index by using include column or not using Edit:
Possible Duplicate: How do I make a request using HTTP basic authentication with PHP
Possible Duplicate: How can I understand nested ?: operators in PHP? Why does this:
Possible Duplicate: Can main function call itself in C++? I found this problem very
Possible Duplicate: Hadoop and 3d Rendering of images It is possible to use Apache
Possible Duplicate: before_filter :require_owner I am trying to restrict access to certain actions using
Possible Duplicate: When does Endianness become a factor? reading this tuto on endianess, i
Possible Duplicate: DOM Mutation event in JQuery or vanilla Javascript I am using backbone.js
I'm probably going about this all wrong, but hey. I am rendering a large
Possible Duplicate: Difference Between Equals and == in which cases equals() works exactly like

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.