Skip to main content

Questions tagged [index-buffer]

Filter by
Sorted by
Tagged with
23 votes
2 answers
23k views

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

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
542 views

Why are most game engines like unity limiting their meshes to 65k indices by default, or enforcing to use uint16 as the default datatype for indexbuffers? I know that its better for performance to ...
-1 votes
1 answer
159 views

I am trying to get a feel for how to structure WebGL/OpenGL apps and have been looking through sources for the types of buffers they use. I've found these: uvs occlusion noise bitangents tangents ...
1 vote
1 answer
3k views

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
413 views

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 ...
1 vote
1 answer
506 views

I need to know the position of each vertex (and triangles) from a mesh (a pointer to ID3DXMesh, created by calling functions like ...
4 votes
1 answer
3k views

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 ...
0 votes
2 answers
655 views

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 <...
0 votes
1 answer
277 views

Recently I start to study SharpDx, so I am a newbie for it. I try to create a cube which has difference color on each vertex such as the picture below. However, what I created after my coding is ...
1 vote
1 answer
1k views

I have been loading obj files and using indices for handling duplicated vector positions, but I have not gotten to the point of requiring normal data to be passed to the shaders as well. The problem ...
0 votes
1 answer
598 views

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 ...
2 votes
3 answers
1k views

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: ...
0 votes
1 answer
1k views

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 ...
0 votes
1 answer
1k views

For our student project I've been tinkering with an OBJ-loader in order to import models into our application. It loads without issues, and drawing it kind of works without index (the model is ...
1 vote
1 answer
450 views

Good morning, I have an Indexbuffer created with usage D3D11_USAGE_DEFAULT and CPUAccessFlags 0. Now I want to read data from this buffer regularly (it is a terrain index buffer). But the problem is ...
1 vote
1 answer
853 views

I am trying to create a textured hexagonal tile map in opengl. I have the VBO and respective index buffer. Additionally I have a texture atlas for texturing individual tiles. I'm attempting to create ...
1 vote
1 answer
2k views

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. ...
0 votes
1 answer
469 views

Right now I'm trying to load a heightmap into my LWJGL application. I load it like that into a float[][] array and I can read the height value at a given x and z position in the map: ...
1 vote
2 answers
1k views

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 ...
3 votes
1 answer
1k views

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
0 answers
190 views

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
1 answer
1k views

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

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 ...
0 votes
1 answer
552 views

I have successfully loaded a triangulated Wavefront (.obj) into 6 vectors, the first 3 vectors contain the locations for vertices, UV coords, and normals. The last three have the indices stored for ...
10 votes
1 answer
2k views

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

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 ...
0 votes
1 answer
2k views

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
3k views

How can I draw many different objects on screen at once, with multiple vertex buffers, using DrawIndexed()? (Drawing the same object is simple, and I'm not looking ...
3 votes
3 answers
6k views

I noticed that there's IASetVertexBuffers() to set multiple vertex buffers at once but there's only IASetIndexBuffer() to set ...
-2 votes
1 answer
239 views

Should I initialize it before Map() or before `Unmap()? Does it make a difference?
2 votes
3 answers
449 views

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 ...
1 vote
1 answer
581 views

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

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 ...
-1 votes
2 answers
1k views

I'm working on a minecraft style games on xna. I know it is not easy to draw a lot of cube with a good ratio of fps. I use the method "DrawUserPrimitive" with a buffer to draw a floor 250X250 cubes. ...
0 votes
2 answers
370 views

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 ...
5 votes
1 answer
2k views

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
1 answer
1k views

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

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

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, ...
2 votes
1 answer
2k views

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 ...
7 votes
3 answers
5k views

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 ...