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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:38:28+00:00 2026-06-16T04:38:28+00:00

Possible Duplicate: VBO – Indexation without indexation Here is my problem, I wanna render

  • 0

Possible Duplicate:
VBO – Indexation without indexation

Here is my problem, I wanna render a huge model (one million of face), I’ve got an index buffer for the faces.

I’ve generate myself a texture for this model, and each region of the texture has to be applied to each triangle. I cannot unfold properly the model, because it will take too much of time, so a Vertice can have multiple texture coords.

Without VBO my renderer is like this :

glBegin(GL_TRIANGLES);
for (unsigned int i = 0; i < g_pModel->GetNbTriangle(); i++) 
{
    glTexCoord2f(TextCoord[6*i+0],TextCoord[6*i+1]);
    glNormal3f(Normal[3*Triangle[i].x],Normal[3*Triangle[i].x+1],Normal[3*Triangle[i].x+2]);
    glVertex3f(Vertex[Triangle[i].x].x,Vertex[Triangle[i].x].y,Vertex[Triangle[i].x].z);

    glTexCoord2f(TextCoord[6*i+2],TextCoord[6*i+3]);
    glNormal3f(Normal[3*Triangle[i].y],Normal[3*Triangle[i].y+1],Normal[3*Triangle[i].y+2]);
    glVertex3f(Vertex[Triangle[i].y].x,Vertex[Triangle[i].y].y,Vertex[Triangle[i].y].z);

    glTexCoord2f(TextCoord[6*i+4],TextCoord[6*i+5]);
    glNormal3f(Normal[3*Triangle[i].z],Normal[3*Triangle[i].z+1],Normal[3*Triangle[i].z+2]);
    glVertex3f(Vertex[Triangle[i].z].x,Vertex[Triangle[i].z].y,Vertex[Triangle[i].z].z);
}
glEnd();

With my VBO I can’t use glTexCoordPointer because it requires as much texture coords as vertexes, and it’s not my case.

Is there a way to do that with VBO and my shader (i’m using GLSL)?

  • 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-16T04:38:29+00:00Added an answer on June 16, 2026 at 4:38 am

    I already told you, that you have to decompose your shared position multiple texture coordinate triangle corners into multiple vertices. A vertex always has exactly one texture coordinate on a given texture. If there’s a difference in texture coordinates, but on the same position, you’ve got different vertices.

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

Sidebar

Related Questions

Possible Duplicate: Can main function call itself in C++? I found this problem very
Possible Duplicate: Remove close button on jQueryUI Dialog? I am getting some problem to
Possible Duplicate: Model.find(1) gives ActiveRecord error when id 1 does not exist If there
Possible Duplicate: Arithmetic operator overloading for a generic class in C# Here is the
Possible Duplicate: Arithmetic in ruby The status_update model takes 2 values in, does some
Possible Duplicate: How costly is .NET reflection? The elegant solution to a problem I
Possible Duplicate: Java Wait and Notify: IllegalMonitorStateException What is the problem with private final
Possible Duplicate: How can I increment a date by one day in Java? I
Possible Duplicate: Easiest way to echo HTML in PHP? Hello, one simple and short
Possible Duplicate: How do I use arrays in C++? One dimensional array as a

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.