Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [vertex-buffer-object]

The tag has no usage guidance.

0
votes
1answer
67 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
1answer
117 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
1answer
781 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 ...
1
vote
0answers
132 views

How to format a vertex layout descriptor (MTLVertexBufferLayoutDescriptor) for this scenario

I am having a lot of trouble understanding what the difference between a layout and a descriptor is inside of a MTLVertexBufferLayoutDescriptor object. I am hoping to create a layout descriptor that ...
3
votes
3answers
416 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 ...
5
votes
1answer
58 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 ...
11
votes
2answers
4k 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 ...
1
vote
1answer
194 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 ...
5
votes
0answers
228 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 ...
1
vote
0answers
549 views

'glGenVertexArrays’ was not declared in this scope

I wrote an OpenGL program on Windows that I am trying to port to a Raspberry Pi 3 running Raspian OS. When I try to compile, I get the following errors: include/object.h|44|error: ‘...
2
votes
1answer
422 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
1answer
187 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
2answers
2k 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 ...
2
votes
1answer
299 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. ...
3
votes
1answer
2k 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
2answers
337 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
1answer
65 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
1answer
894 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
1answer
350 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
2answers
223 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 ...
6
votes
1answer
625 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 ...
1
vote
2answers
1k 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). ...
3
votes
2answers
603 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 ...
10
votes
2answers
5k 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
3answers
1k 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 (...
4
votes
1answer
593 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
2answers
2k 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 ...
10
votes
3answers
1k 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. ...