Questions tagged [index-buffer]

The index buffer contains integers, three for each shape in a mesh of structures, which reference the various attribute buffers (position, color, UV coordinates, other UV coordinates, normal, …).

The index buffer contains integers, three for each shape in a mesh of structures, which reference the various attribute buffers (position, color, UV coordinates, other UV coordinates, normal, …).

39 questions
1
vote
4 answers

How does glDrawElementsBaseVertex work?

I have a flat plane and an index buffer, or EBO with the indices marked on the image: Now if I call: glDrawElementsBaseVertex(GL_TRIANGLES, 3, GL_UNSIGNED_INT, 0, 0); I get this: This I understand. Further, If I do…
Zebrafish
  • 11,682
  • 3
  • 43
  • 119
1
vote
0 answers

C# Assimp lib can not get index information

I am using Assimp for C#.I Import fbx files. I am trying to render polygon containing files with index buffer. I try to get them like: var meshes = meshFile.Meshes; foreach (Assimp.Mesh mesh in meshes) { List
1
vote
1 answer

OpenGL indexbuffer not working when loading objects one by one

I'm learning OpenGL and ran into an "obstacle". I drew some houses (blocks and pyramids) using an indexbuffer. This works fine when loading all the vertices (from all houses) into the vertexbuffer and using 1 big indexbuffer. Now I want to animate…
1
vote
2 answers

Using Index buffers in DirectX 11; how does it know?

Let's say I create two vertex buffers, for two different meshes. (I'm assuming creating separate buffers for separate meshes is how it's usually done) Now, let's say I want to draw one of the meshes using an index buffer. Looking at the book…
Elias Finoli
  • 121
  • 9
1
vote
2 answers

How exactly does indexing work?

From my understanding, indexing or IBOs in OpenGL are mainly used to reduce the number of vertices needed to draw for a given geometry. I understand that with an Index Buffer, OpenGL only draws the vertices with the given indexes and skips any other…
tubberd
  • 540
  • 5
  • 15
1
vote
1 answer

How to setup Index Buffer Object

I am trying to render a basic model using lwjgl (java OpenGL binding). I am trying to do this off my own knowledge as much as possible using what I remember. I created a vbo like this: int verticesVBO = GL15.glGenBuffers ( ); vboIDs.add (…
SemperAmbroscus
  • 1,308
  • 2
  • 12
  • 23
1
vote
1 answer

Primitive assembly performance

I am currently experimenting with some terrain/height-map rendering. Each tile of that terrain is rendered with a VBO and IBO. For being able to draw subtiles easily, I ordered the indices using Morton coding and at this point some questions about…
Nino
  • 429
  • 2
  • 8
1
vote
1 answer

What the point in index buffer for triangulated mesh

Suppose i have triangulated mesh, then i have a lot of repeated positions between triangles, and index buffer may become very handy in this case. But if i also need normals, then no gain, because all triangles have different normals. So tuple {…
Yola
  • 18,496
  • 11
  • 65
  • 106
0
votes
1 answer

How to change element array buffer or have multiple?

I'm trying to create and element array buffer to draw two different shapes with a different number of vertices. I haven't been able to find any resources on this as they mostly show how to draw a single triangle or square separately. Let's say i…
0
votes
1 answer

Is there a more idiomatic way of creating an index buffer in Rust

In computer graphics, one of the most basic patterns is creating several buffers for vertex attributes and an index buffer that groups these attributes together. In Rust, this basic pattern looks like this: struct Position { ... } struct Uv { ...…
gfaster
  • 157
  • 2
  • 12
0
votes
1 answer

Issue with read vertex / index buffer with structured buffer in DXR

Scene is just like above image(Sponza scene), and I think texture index for each geometry is good, but texture coordinate seems wrong I'm currently upload descriptor in descriptor heap like this : (instance 0 textures(0 to 74)) (vertex buffer for…
0
votes
1 answer

Problem with making mesh at runtime. (Unity3d)

I'm trying to make mesh with Vector3 data from database at runtime. Here is my code private IEnumerator CreateShape() { int count = 0; triangles = new int[x_size * y_size * 6]; //index buffer for (int i = 0; i < x_size - 1; i++) …
Rolang14
  • 5
  • 3
0
votes
1 answer

Using separate vertex buffer and texture coord buffer and multiple indices to draw tris DirectX11

So I saw these posts DX10+ multiple vertex buffers, single index buffer and Using Multiple Vertex Buffers In DX10/DX11 and vague understood Why Directx11 doesn't support multiple index buffers in IASetIndexBuffer When rendering indexed tris, I was…
yosmo78
  • 489
  • 4
  • 13
0
votes
1 answer

Why Directx11 doesn't support multiple index buffers in IASetIndexBuffer

You can set multiple vertex buffers with IASetVertexBuffers, but there is no plural version of IASetIndexBuffer. What is the point of creating (non-interleaved) multiple vertex buffer datas if you wont be able to refer them with individual index…
Ibrahim Ozdemir
  • 613
  • 1
  • 5
  • 18
0
votes
1 answer

DirectX11 each triangle using first vertex in the buffer

I'm currently having a problem with my DirectX 11 voxel renderer where whenever a triangle is rendered, the first vertex in the buffer is being used rather than one of the correct vertices. I have a working version of the same mesh generation…
Sturdy
  • 33
  • 7