Questions tagged [index-buffer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
122 views

Why are meshes limited to 65k indices or uint16 in most game engines?

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

The types of buffers typically used in robust WebGL/OpenGL apps

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 ...
0
votes
1answer
107 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
1answer
89 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 ...
1
vote
1answer
423 views

How to retrieve vertex information from ID3DXMesh

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

A question about SharpDx Colored Cube

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

Using indices in obj files and handling normals

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
1answer
182 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 ...
2
votes
3answers
544 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: ...
0
votes
1answer
354 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 ...
0
votes
1answer
440 views

DX11: Drawing with index buffer not working?

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

Direct3D11 Reading from (Static) Index Buffer

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

How to draw textured tile map in opengl

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

Heightmap vertex list to vertex + index list

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
2answers
205 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 ...
3
votes
1answer
577 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
0answers
105 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
1answer
523 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] ...
2
votes
3answers
10k 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 ...
0
votes
1answer
394 views

Loading Wavefront Data into VAO and Render It

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 ...
8
votes
1answer
1k 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 ...
4
votes
3answers
840 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 ...
0
votes
1answer
831 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
2answers
2k views

DirectX11: Drawing multiple objects

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

Does it matter where I initialize Directx11's shader constant buffer?

Should I initialize it before Map() or before `Unmap()? Does it make a difference?
2
votes
3answers
359 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 ...
1
vote
1answer
457 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
1answer
719 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 ...
-1
votes
2answers
1k views

Draw 60,000 cubic with DrawUserPrimitives on xna with only 20 fps-buffer problem?

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
2answers
253 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 ...
5
votes
1answer
1k 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
1answer
934 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
1answer
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: ...
3
votes
2answers
794 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, ...
2
votes
1answer
1k 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 ...
7
votes
3answers
3k 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 ...