Questions tagged [index-buffer]
The index-buffer tag has no summary.
42 questions
23
votes
2
answers
23k
views
Difference in glDrawArrays and glDrawElements
While refreshing my mind on OpenGL ES, I came across glDrawArrays and glDrawElements.
I understand how they are used and sort ...
10
votes
1
answer
2k
views
How do commercial games engines organise the index/vertex buffers?
Preface: This question is going to be coming from a Direct3D point-of-view, because that's what I'm familiar with.
Obviously we incur a slight overhead every time we change the vertex or index ...
8
votes
3
answers
2k
views
Using same buffer for vertex and index data?
Is it possible to use the same buffer for both GL_ARRAY_BUFFER and GL_ELEMENT_ARRAY_BUFFER?
I load both vertex data and index ...
7
votes
3
answers
5k
views
Using 16 bit index buffers - USHORT vs UINT
In D3D11, they still have the ability to make 16 bit and 32 bit index buffers.
Few models will use more than the max (20k tri) that a USHORT index buffer can handle, but will I really pay a bad ...
5
votes
1
answer
2k
views
Memory allocation strategy for the vertex buffers (DirectX 10/11)
I'm writing a CAD system. I have a 3D scene and there are many different objects (walls, doors, windows and so on). The user can add or delete objects.
The question is: How do I keep track of all the ...
4
votes
2
answers
1k
views
What is UVIndex and how do I use it on OpenGL?
I am a noob in OpenGL ES 2.0 (for WebGL) and I'm trying to draw a simple model I've made with a 3D tool and exported to .fbx format. I've been able to draw some models that only have: A vertex buffer, ...
4
votes
1
answer
1k
views
Per-vertex position/normal and per-index texture coordinate
In my game, I have a mesh with a vertex buffer and index buffer up and running. The vertex buffer stores a Vector3 for the position and a Vector2 for the UV coordinate for each vertex. The index ...
4
votes
1
answer
3k
views
How do you split indices and vertices if their quantity goes over the limit?
I want to draw a flat surface of 500x500 squares which are built out of four vertices by two triangles.
There are 1,000,000 vertices and 1,500,000 indices.
The Reach profile of xna, limits ...
3
votes
3
answers
6k
views
One index buffer with multiple vertex buffers?
I noticed that there's IASetVertexBuffers() to set multiple vertex buffers at once but there's only IASetIndexBuffer() to set ...
3
votes
1
answer
1k
views
OpenGL vertex data per index
Usually, vertex data is assigned to a particular vertex, like this:
[data] [vertices]
[1.31] -> [1, 13, 5]
[84.3] -> [5, 8, 12]
[.095] -> [8, 3, 10]
...
3
votes
3
answers
17k
views
How to implement Index Buffer Object (IBOs) with texture coordinates in OpenGL?
I was using IBOs to render meshes (for example a cube) from wave-front files (.obj), without texture coordinates or normals, in OpenGL.
Following this, I attempted to implemented texturing. The mesh ...
3
votes
1
answer
1k
views
opengl storing multiple indices into indices buffer
After parsing collada files I found out that we have to load two(or more) indices each pointing to say a vertex or normal etc.
like this (<p>3 0 2 0 0 0</p>)
Is there a way to load (and use)...
2
votes
3
answers
449
views
Why Index Particles?
This is a general question, but as a specific example, I'll use the XNA Particles3D sample (http://xbox.create.msdn.com/en-US/education/catalog/sample/particle_3d).
What is the point of the index ...
2
votes
1
answer
2k
views
how can I specify interleaved vertex attributes and vertex indices
I'm writing a generic ShaderProgram class that compiles a set of Shader objects, passes args to the shader (like vertex position, vertex normal, tex coords etc), then links the shader components into ...
2
votes
3
answers
1k
views
DirectX11 - Texturing Terrain Mesh with Shared Vertices
I'm trying to create and texture a terrain mesh in DirectX11. I've managed to create the mesh itself, but I don't know how I should do the texturing. Let me start by explaining what I'm doing so far:
...