Questions tagged [vertex-buffer-object]
The vertex-buffer-object tag has no usage guidance.
42
questions
0
votes
0
answers
53
views
Vertex attribute alignment <4 bytes
I know that vertex attributes sourced from vertex buffers in OpenGL need to adhere to the basic alignment requirements of their base types, so e.g. 4 bytes for floats or uints. However, I am unable to ...
0
votes
0
answers
27
views
DirectX 11 - 3D - VBO indexing per object's buffered attributes?
If I have a series of vertices positions:
(x1, y1, z1)
(x2, y2, z2)
(x3, y3, z3)
...
0
votes
2
answers
138
views
Why are the transformations of an object calculated on CPU?
If I understood correctly this is the process of rendering an object:
Array of 4d vector defining points 3d points(with the fourth component 1) representing object's vertices in object/local space:
<...
0
votes
0
answers
40
views
Why use buffer streaming instead of collecting data on CPU and uploading to GPU all at once
Say I have a couple of meshes that I want to reupload to GPU for each frame. I can do this by generating a single array from all the meshes on CPU and then uploading to GPU (ex with ...
1
vote
1
answer
390
views
What does it mean for a buffer to be "tightly packed"?
I keep running into this phrase when reading specs and tutorials, but I have no idea what "tightly packed" is supposed to mean. Is it simply the opposite of an interleaved buffer? I.e. all ...
0
votes
0
answers
570
views
Bind shader storage buffer object for vertex input
I'm trying to learn about compute shaders, and as such decided to give it a go at implementing the particle system described in these slides: https://www.khronos.org/assets/uploads/developers/library/...
4
votes
1
answer
526
views
Which provides better intuition: THREE.Geometry or THREE.BufferGeometry?
THREE.js recently dropped support for THREE.Geometry in favor of exclusively THREE.BufferGeometry. I'm trying to decide which paradigm to teach in my computer graphics course to best provide students ...
0
votes
1
answer
138
views
Passing non-interleaved data to glBufferStorage without using glBufferSubData
I would like to use glBufferStorage to load data once into the vertex buffer. However sometimes I want to pass non-interleaved data from separate arrays like shown ...
0
votes
1
answer
204
views
Are vertices of each LOD version always loaded into VRAM
Are vertices of each LOD version always loaded into VRAM?
I know many game engines have a LOD feature for mesh vertices and textures.
I'm just wondering if all vertices and textures of all(each) LOD ...
2
votes
1
answer
52
views
Different Vertex structures in multi-purpose system
A typical definition of a Vertex structure in C++ might look something like this:
struct Vertex
{
Vec3 pos;
Vec3 color;
}
However, we found ourselves ...
2
votes
2
answers
332
views
How does a Vertex Buffer manage memory?
I'm learning OpenGL and I'm trying to understand things properly. If my understanding is incorrect at any point, please correct me.
Introduction
So let's say we have a triangle. This triangle has its ...
1
vote
2
answers
549
views
Efficiently transferring only needed parts of the vertex data to the GPU (C++/OpenGL)
I have a situation, where I have an array of vertices on the CPU side, for which, besides rendering-relevant data, like their position, I have a lot of other data at each vertex. All vertex data is ...
0
votes
0
answers
23
views
Rendering different array types in the same vertex/fragment shader?
I have a pretty basic widget rendering, largely based upon the learnopengl.com "hello triangle." I'm actually using a tristrip to create two triangles, forming a semi-opaque square over the ...
1
vote
1
answer
56
views
Performance of particle implementation
I am about to implement the renderer for a simple particle system. Every particle has to be updated every frame (position, rotation, scale) and so I was wondering which way is usually faster:
...
1
vote
1
answer
75
views
Confusion about glVertexAttribPointer and non-active attributes
When binding an attribute index using glVertexAttribPointer, what happens when a later bound program does not contain an attribute at said index?
Is the behaviour undefined, or is the attribute ...
3
votes
1
answer
2k
views
Vulkan: efficient way to update VBO mesh vertices?
I would like to change/add/remove some mesh vertices in existing VBO's (while deforming and remeshing 3D objects) . With OpenGL I would have to reload whole vertex VBO's. I suppose with Vulkan there ...
0
votes
1
answer
281
views
Adding vbos to a vao once it has been created
Is it possible to add vbos to vbos after their creation? For example (pseudo-code):
...
6
votes
1
answer
229
views
Same draw call causing extremely different GPU usage under different triangle orders
So I have a bit of a predicament I am trying to solve. I have 10,000 triangle strips I am trying to draw. Each one has a z-order for the entire strip and within each strip the most recent triangles ...
3
votes
1
answer
5k
views
Replacing Vertex Attributes (glBufferData vs glBufferSubData)
I'm sending a large number of data to the vertex shader. I use glBufferData to generate my ...
6
votes
3
answers
6k
views
What is an OpenGL VAO in a nutshell?
Before I get downvoted. I am not asking how to use them, I know how to use them. I am trying to understand what they are. For example, an array is actually a contiguous section of memory, a linked ...
4
votes
1
answer
119
views
Role of gl.vertexAttrib
I'm re-learning WebGL, and I stumbled upon gl.vertexAttribPointer and gl.vertexAttrib. To my knowledge, gl.vertexAttribPointer tells the GPU how the data in the currently binded buffer relates to the ...
18
votes
2
answers
19k
views
GL_STATIC_DRAW vs GL_DYNAMIC_DRAW vs GL_STREAM_DRAW: does it matter?
In OpenGL the buffer object functions (glBufferData, glBufferSubData, and probably a few others) have a parameter ...
0
votes
1
answer
331
views
How to read vertex color before rendering texture?
I'm using VBO to upload vertex array, colors and then texture coordinates! I did implement mouse pick with color coding technique. It works fine but when I render texture after ReadPixels, it returns ...
6
votes
0
answers
461
views
In Metal, what performance advantages are there, if any, to using vertex descriptors and the [[stage_in]] qualifier?
Metal seems to provide two very different ways to access vertex data in your vertex shader. You can:
Create an MTLVertexDescriptor object, which describes vertex ...
2
votes
1
answer
1k
views
Passing Colour from program to vertex shader
New to opengl! I am having issues with passing colours from the program to vertex shader.
I am creating a grid where I want to control the color of each cell.Thus I am generating each cell and having ...
1
vote
1
answer
502
views
LWJGL/OpenGL render textured quad
So this should be easy and simple, but I still can't get it to work. All I need is a small example program that:
Takes in a BufferedImage (TYPE_INT_ARGB)
Renders that BufferedImage on a textured quad
...
2
votes
2
answers
6k
views
Can one VAO store multiple calls to glVertexAttribPointer?
If no, Should I create a new VAO for every VBO that has its own vertex attribute configurations?
Could you please give me a snippet code example that shows how to use one VAO for multiple VBOs? All ...
3
votes
1
answer
940
views
Multiple buffers and calling glBufferSubData
In my project, for convenience I would like to use many buffers.
Many buffers in my case means 50-100 terrain patches represented by buffers with vertex coordinates, normals, indices and maybe color. ...
2
votes
1
answer
5k
views
Multiple VAO share a VBO
Let's say I have a have 10 different terrains. Each terrain have the same x and z coordinates, but they have different y coordinate, normals and colors. The indices used for element rendering is also ...
4
votes
2
answers
961
views
How glVertexAttribPointer works?
I know that when you call glVertexAttribPointer, you are specifying how the buffer currently binded should take its own data. But if you can have binded one buffer per type (Let's say GL_ARRAY_BUFFER ...
5
votes
1
answer
187
views
OpenGL VertexArray Data "Retention"?
After calling glVertexAttribPointer to associate data of the currently bound vertex array with data from the currently bound ...
4
votes
1
answer
2k
views
Attribute Location in Multiple Shader Programs
I'm trying to switch between the rendering of two different scenes as fast as possible using OpenGL.
For all my OpenGL related stuff I wrote a wrapper-class which provides a quite easy way of adding ...
1
vote
1
answer
798
views
How to use Shaders with vertex & index buffers?
I'm trying to render a randomly generated terrain with vertex buffers and OpenGL. I want to use a shader to color the terrain, but it seemms like my shader isn't used. I have used shaders before when ...
5
votes
2
answers
968
views
Sharing calculation result between shader programs in OpenGL
Question
Is there a way to compute something in a first shader program (eg. screen-space coordinates from word-space ones) and access those results in an another shader program?
Possible solutions
...
8
votes
1
answer
1k
views
Label Placing for thousands of objects with OpenGL
Question
How to manage data (GPU,CPU) for dynamic label placement in 3d for thousands of objects (OpenGL)?
Details
objects:
count: 2k-10k
type: points/quads
labels:
bilboarding
data: text and ...
4
votes
2
answers
4k
views
How to encode/decode buffer data in glTF?
I'm playing around with base64 embedded data URI's and tried to analyze the buffer data of the gltf box sample model, as defined in this example here (line 76).
...
5
votes
2
answers
2k
views
Is it possible to store the plain buffer data in gltf files?
The GL Transmission Format comes along with a JSON styled main file which basicly describes the scene and binary files which contain the buffers.
I'm currently writing a WebGL library and I need to ...
14
votes
2
answers
11k
views
What is an index buffer and how is it related to vertex buffers?
I have a vertex buffer like this:
0.0, 0.0,
1.0, 0.0,
0.0, 0.6,
1.0, 0.6,
0.5, 1.0
I have the following index buffer:
...
5
votes
3
answers
3k
views
Is it possible to create minimal glTF files with vertex and index buffers?
I am currently looking into glTF to use as a transfer format for my WebGL project. I already have the geometries I wish to render on my WebGL client available as preprocessed vertex and index buffers (...
5
votes
1
answer
1k
views
Dx12 Vertex Buffer incorrect
I'm playing around with directX 12 and I'm having some problems loading geometry in. I have a std::vector vertices definition and I do exactly what the dx12 template does with it.
...
4
votes
2
answers
4k
views
Are there any gltf example datasets available? [closed]
I'm currently researching my options on effeciently exchanging data for a webgl application. I understand the gltf format is still being drafted but I need some example data to understand whether this ...
11
votes
3
answers
3k
views
Why do Vertex Buffer Objects improve performance?
From my basic understanding, a Vertex Buffer Object works something like this (pseudo code):
Normally, if one wanted to say, draw a square, one could issue line drawing commands.
...