The vertex-buffer tag has no usage guidance.
1
vote
0answers
23 views
When should I use auto-managed buffers in LWJGL 3?
LWJGL3 has two methods of creating buffers that I know of: Auto-managed buffers that clean up the buffers automatically using the MemoryStack class, and manually managed buffers that must be manually ...
0
votes
1answer
27 views
DirectX Assembler Stage, passing same data
I'm having problems with the Input Assembler.
The first time the data is passed through the pipeline, everything is fine.
But, when the index buffer (with a diffrent/higher index than before) refers ...
0
votes
0answers
195 views
How to update vertex buffer in DirectX 12
I would like to create cloth simulation. Which type of buffer should i use for vertices. I will need to update them on every frame. And how updates need to be done. I'm new to graphics programming, ...
1
vote
1answer
91 views
Multiple buffers and calling glBufferSubData
Originally asked this on Computer Graphics, but it might fit in better here.
In my project, for convenience I would like to use many buffers.
Many buffers in my case means 50-100 terrain patches ...
3
votes
3answers
152 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
60 views
Data overwritten in MapSubresource() method
I am trying to dynamically update the vertex buffer in a UWP project using SharpDX, once every time I call the following method, where context is the device context member.
public void ...
0
votes
1answer
80 views
Streaming to VAO VertexBuffer using OpenGL Direct State Access for Instancing
How do i stream to a vertex buffer using Direct State Access? I want to update my vertex buffer of matrices every frame so i can use it in my Shader.
This is how i specify my buffer. I do this once ...
2
votes
1answer
80 views
How do I draw a high-performanced scatter plot
I am new to DirectX and currently I'm trying to use it for data visualization, to be specific, a 3D scatter plot. There are very limited resources on the internet, and I have read part of Frank D Luna'...
1
vote
2answers
82 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 ...
0
votes
1answer
219 views
In game engine, how to get the vertices buffers of different vertex formats for render from the mesh file properly?
I'm a fresher on engine programming. I have a question of how we can get the vertices buffers of vertex formats from the mesh file.
For example, in OBJ file or FBX file, we save the positions, ...
0
votes
2answers
110 views
Build a vbo once every second
I have a VBO storing some data in my game. The thing is, the data can change at a rate of about a second. The data is not fixed size, meaning that some objects will sometimes be visible, sometimes ...
1
vote
0answers
123 views
Drawing multiple polygons with vertex buffer object
I tried to create program in which I would draw multiplepoygons
here is fragment of what I have done:
GLuint VertexArrayID;
exampleof drawing triangle(I have more polygons, like circle, and so on..)
...
3
votes
1answer
355 views
Efficient vertex buffer memory management?
I am building a voxel engine with a similar mechanism to minecraft(yes, I know...).
It works by loading and unloading individual chunks of 16*64*16 cubes each in a square grid around the player. This ...
6
votes
0answers
160 views
How to draw Shadow Volumes in one draw call?
I've got a simple app that draws 3D cubes using instance rendering and I'm implementing Shadow Volume. Each cube's vertex, uv, normal and index data are statically stored in 4 vertex array buffers. On ...
1
vote
2answers
225 views
Reading mesh data back from OpenGL vs storing two copies
I'm wondering if whether it's a good idea or not to keep a copy of vertex data in the main memory or just read it back via glGetBufferSubData (or glMapBuffer/glMapBufferRange).
The reason why I'd do ...
1
vote
1answer
83 views
ID3D11Buffer and std::array : buffer looks empty
I am having trouble at rendering vertices stored in a std::vector.
// Create and initialize the vertex buffer.
D3D11_BUFFER_DESC vertexBufferDesc;
ZeroMemory(&vertexBufferDesc, sizeof(...
1
vote
0answers
44 views
Is it possible to have a SoA Vertex Buffer in DirectX 11?
Hi!
I'm wondering if it is possible to structure a Vertex Buffer in a SoA approach like this
{ x1, x2, x3 . . . xn, y1, y2, y3 . . . yn, z1, z2, z3 . . . zn }
instead of the traditional AoS ...
0
votes
2answers
106 views
How to handle mesh update in its vertex buffer
suppose i have a mesh, it can undergo any kind of changes - bend, stretch, even been torn. How should i update vertex buffer in DirectX for this mesh. For now i recreate it every time, and i don't see ...
1
vote
0answers
42 views
XNA maximum VertexBuffer size exception
I am trying to build content(a text file contains list of triangles vertices) for an XNA application through a custom pipeline importer. It works ok. But when number of triangles gets near 1m(in this ...
0
votes
1answer
259 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 D3DXCreateBox, D3DXCreateTeapot and D3DXCreateSphere) to perform some ...
2
votes
1answer
2k views
MonoGame: Draw thousands of quads without hardware instancing
In my game, every bit of geometry is a textured quad billboard in 3D. I have many thousands of these things on screen at once, sometimes with overdraw. As I understand it, there are a few ways I can ...
0
votes
1answer
254 views
Making multiple VertexPositionColor variables in the same class? - XNA
I have studying XNA on my spare time for about a year now and I could use some professional help on this issue. Any time given to my problem is appreciated.
I have two VertexPositionColor variables ...
0
votes
1answer
233 views
Insufficient memory on creating vertex buffers
I'm building a voxel world generator with XNA where the voxels are rendered as polygonal cubes. The world is divided into 1024 chunks of 32x32x256 cubes each (as 32 chunks by 32 chunks), and each ...
1
vote
1answer
2k views
How to render a vertex buffer in DirectX11 C++ (specifically with box2d's b2Draw)
I have all the DirectX11 devices etc setup and working with DirectXTK's SpriteBatch and currently attempting to implement a b2Draw class to draw my box2d physics worlds.
I have little idea on how to ...
1
vote
1answer
154 views
How to fix model matrices colliding in vertex shader?
I am new to OpenGL programming and I'm writing some basic code to display a few objects onto a screen.
I have a pyramid shape that I'm displaying, as well as a box shape that I am displaying. The ...
0
votes
3answers
104 views
Arbitrary number of VBO to Vertex Shader
I am currently using standard modern OpenGL way to render a mesh via VBO and attributes
glEnableVertexAttribArray(aVertexPosition);
glBindBuffer(GL_ARRAY_BUFFER, VBO);
...
0
votes
3answers
962 views
Can I mix the use of VAO and direct usage of glVertexAttribPointer?
Let's say I am not using VAOs. I have an array of vertex positions in memory that I want to send to the shader. I do the following (assume I have enabled the corresponding vertex attrib arrays):
...
2
votes
1answer
81 views
Vertex definitions and shaders [closed]
I noticed that from looking at other examples like say .. riemers tutorials he takes a buffer with a bunch of vector3's in it and ties it to a shader which expects a float4 ... why does this work in ...
0
votes
1answer
73 views
What data to store along a vertex
Is there any other recommended data I should store in the vertex buffers aside from a vertex' coordinates, normals and texture coordinates?
For example data I'd need for a feature that almost every ...
7
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 ...
0
votes
1answer
61 views
Geometry design and buffers
I'm making some tests with rendering stuff and I'm wondering how to design my Geometry class. For the moment, here is how I do:
Init: Stock array with positions, array with colors, array with normals,...
1
vote
1answer
690 views
Techniques for managing vertex buffer memory
I'm learning OpenGL and I haven't seen any advice on managing vertex buffers in all of the tutorials I've read.
The basic problem is that I have some memory allocated as a buffer B in which I'm going ...
2
votes
3answers
433 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 data into a big slab of memory, so it would be easier for me to just load ...
2
votes
1answer
1k views
Draw call optimization for multiple meshes in DirectX11
I have a large scene in a B3D model, which includes about 120 meshes as in the following pictures:
large B3D scene http://s22.postimg.org/d1h75hr0v/Untitled.png
Each mesh contain a vertex buffer ...
1
vote
1answer
2k views
gl_VertexID values when calling glDrawElements
I am struggling a bit to understand the values that gl_VertexID primitive contains when the vertex shader is executed.
I have the standard modern rendering pipeline, in which after setting up shaders,...
0
votes
1answer
452 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 interleaved way, i.e. (posL,normalL),(posL',...
0
votes
1answer
279 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 ...
1
vote
1answer
706 views
How to use LWJGL Vertex Buffer Objects?
I have been learning how to make a game with LWJGL for a while now by following YouTube tutorials online but I've recently been having a problem understanding Vertex Buffer Objects. I've looked at ...
0
votes
2answers
322 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
73 views
How to create a vertex buffer that provides this pattern?
I have a series of vertices that I want to layout with the following configuration, but I haven't been able to find out how to do this with the square and X pattern. Most of the time I have generally ...
2
votes
2answers
1k views
Using Appendbuffers in unity for terrain generation
Like many others I figured I would try and make the most of the monster processing power of the GPU but I'm having trouble getting the basics in place.
CPU code:
using UnityEngine;
using System....
1
vote
1answer
346 views
Reuse VertexBuffer or new VertexBuffer object?
I'm trying to render bitmap fonts in directX10 at the moment, and I want to do this as efficiently as possible. I'm having a hard time getting a start on my design because of this question though.
So ...
4
votes
3answers
1k views
How can I render from a buffer that exists and was created on on the GPU?
I'm looking for a unity API or function call to allow me to do the following ...
I wrote some really complex functions that are compute shaders. These compute shaders manage a huge compute buffer ...
4
votes
2answers
3k views
Vertex buffers - interleaved or separate? [closed]
Interleaved - all vertex data (position, normal, texcoord...) kept in 1 vertex buffer, separate - each vertex attribute is kept in a separate vertex buffer (1 for positions, 1 for normals...).
I know ...
3
votes
2answers
120 views
Multiple ( V- / I- ) Buffers, is it sane?
Currently I am developing an RTS game using XNA ( / ANX.Framework ).
There is one thing bothers me. I am not sure in what way or how to organise Buffers.
Should I use a new Vertexbuffer for any object ...
3
votes
1answer
395 views
How do I use unpackHalf2x16?
I'm trying to use (un)packHalf2x16, without success so far. I'm drawing with:
glVertexAttribIPointer(0, 2, GL_UNSIGNED_INT, 0, 0);
glEnableVertexAttribArray(0);
glBindBuffer(GL_ARRAY_BUFFER, vbo);
...
3
votes
2answers
169 views
Are buffers in OpenGL associated with GLSL programs?
I have two different shader programs in my OpenGL code.
1- renders simple font using freetype
2- simple shader which draw primitive shapes.
I sent both of them some data using buffers, I understood ...
0
votes
1answer
310 views
Optimization with VBOs [closed]
I am currently working on a cube engine and am experiencing some issues with CPU optimization.
I store all my quad VBO data inside a Block (at x,y,z of a chunk) class, which is stored inside an array ...
2
votes
1answer
247 views
Does interleaving in VBOs speed up performance when using VAOs
You usually get a speed up when you use interleaved VBOs instead of using multiple VBOs. Is this also valid when using VAOs?
Because it's much more convenient to have a VBO for the positions, and one ...
1
vote
3answers
2k 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 one index buffer. So I assume that I can simultaneously only have one ...