Questions tagged [index-buffer]
The index-buffer tag has no summary.
42 questions
1
vote
1
answer
2k
views
How to update indices for dynamic mesh in OpenGL?
So I am making a 3D batchrenderer for my engine, and the basic concept is that we make large enough VBO and IBO to accompany all the vertex data(positions, normals, uv etc.) and update the VBO using <...
1
vote
1
answer
3k
views
When does it make sense to use Index Buffers?
The concept of Index buffers is that certain vertices are shared across faces, hence can be reused to save space of duplicated verticies. A vertex is usually more than 12 bytes (depending on the ...
0
votes
1
answer
412
views
How can I color single triangles with a color palette?
My primary goal is to have a lowpoly rendering style, so that each triangle has its own homogeneous color on all its fragments, meaning color is not interpolated between vertex.
I have my indices ...
0
votes
1
answer
598
views
How can I split my terrain into quads so that each quad would have a renderable vertex/index buffer? (DirectX11, C++)
I am creating a quad tree to store my terrain in chunks and currently have the implementation working to an extent.
I am currently starting with a grid of triangle pairs that make squares and ...
0
votes
1
answer
1k
views
Getting crash on glDrawElements
Here is the code where I initialize the VAO, vertex attributes(also the main VBO) and EBO(im using my own wrapper class for these "databuffers" to hide some of the API features and make life easier so ...
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:
...
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 ...
1
vote
1
answer
2k
views
OpenGL VAO Index Not Drawing Correctly
I'm going insane trying to work out why I unable to draw a triangle using VAO and indexing. I have a bunch of redundant vertexes so that i can switch my index array up to test the drawing.
...
1
vote
2
answers
1k
views
OpenGL: Does it make sense to use an Index Buffer With GL_TRIANGLE_FAN?
When trying to draw circles in webGl (You can answer the question even in openGl terms, I'll understand both), I came across the TRIANGLE_FAN flag when calling either glDrawArrays (with only a vertex ...
2
votes
0
answers
190
views
Render triangles without index buffer in Opengl ES [closed]
I'm reversing a 3d model format from a famous game (not sure if i should mention it), which is released both for windows (app store) and for Iphone and android.
The weird thing is that while the ...
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 ...
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 ...
0
votes
1
answer
2k
views
Providing texture coordinates and using indexed drawing at the same time
Please consider the following vertex structure
struct vertex {
vec3 posL, normalL;
};
Using this vertex layout, we can provide the vertex data in an ...
0
votes
2
answers
654
views
How to draw non-triangulated mesh?
I am working with DirectX (C#/C++).
I am wondering is it possible to do not triangulate meshes and what the difference between cases (in loading and rendering code)? If so, how to do this? I know <...
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 ...
1
vote
1
answer
580
views
Optimize a vertex buffer and generate its associated index buffer
I need to generate a 64*64 grid with each cell being 32*32 wide.
The following code works perfectly but I was wondering whether it can be further optimized when creating the index buffer for it.
I'...
0
votes
1
answer
984
views
How to update "dynamicVertexBuffer" correctly with "setdata" on XNA?
I developed a small 3d games xna and uses a "DynamicVertexBuffer" and "DynamicIndexBuffer" to store and draw my vertices. Everything works fine, but my problem is the "Update" function where I update ...
0
votes
2
answers
370
views
Is it only possible to display 64k vertices on the monitor with 16bit?
I did the first 3D tutorial over at riemers.net and stumbled upon that my graphic card only supports Shader 2.0 (Reach profile in XNA) which means I can only use ...
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 ...
2
votes
1
answer
2k
views
How can I draw multiple vertexbuffers with indices?
I'm using to types of vertices.
For the triangles:
0 Vector3 Position,
12 Color Color,
16 Vector3 Normal
For the lines:
...
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, ...