Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [vao]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
26 views

How to add ambiant occlusion to a mesh created by script

We created a mesh point by point with a script (a huge mesh), and we would like to add ambiant occlusion to this mesh. We use Unity 2019.1.6 and the LWRP template. we already tested the unity ambiant ...
1
vote
1answer
34 views

OpenGL: Shader using wrong layout location

It's actually taking the color vector instead of the vertex vector. I noticed because I set the colors to random(), and the triangle clusterfudge that is my cube keeps changing shape when I reload the ...
1
vote
2answers
3k views

GL_INVALID_OPERATION on glBindVertexArray Despite glGenVertexArrays()

so I've been trying to create a simpler way to draw polygons and and have come across the following issue: When I call glBindVertexArray(m_VAO); it throws a ...
2
votes
2answers
213 views

How does OpenGL know which buffer to draw?

I have been trying out some OpenGL things and was wondering something: How does OpenGL know which buffer to draw when glDrawElements is called (since there are ...
3
votes
1answer
195 views

What is a VAO in Opengl?

i've just started out with Opengl, and i've got to know what Vertex Buffer Objects are, but i really don't understand what VAOs are. Can someone help me?
0
votes
1answer
114 views

What are the different attributes of a vertex array object (VAO)?

What are the 16 attributes of a VAO? 0. vertex position 1. vertex colours 2. normal vector 3. texture coords 4. ??? 5. ??? 6. ??? 7. ??? 8. ??? 9. ??? 10. ??? 11. ??? 12. ??? 13. ??? 14. ??? 15. ???
0
votes
1answer
133 views

OpenGL - Updating VAO array buffer range

I am trying to stream data to a buffer which I have bound to a VAO vertex buffer binding point that I want to access through vertex attributes in the shader. Usually I stream to buffers which I have ...
0
votes
1answer
162 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 ...
0
votes
1answer
128 views

How to remove fragment from VAO?

I have the OpenGL VAO object (~40K) to draw the 3D scene glBindVertexArray(VAO); glDrawElements(GL_TRIANGLES, 4, GL_UNSIGNED_BYTE, nullptr); glBindVertexArray(0); ...
0
votes
1answer
208 views

Storing rendering data for voxel game 1 VAO and VBO or 1 for every chunk

I have a minecraft style voxel game with placing and digging blocks. it runs at 400+ fps on my computer but when I added semi-transparent water it started running at ~40 fps. so a time per frame ...
12
votes
2answers
7k views

OpenGL: Is it possible to use VAO's without specifying a VBO

On all the tutorials I can find about VAO's (Vertex Array Objects), they show on how to use them by configuring vertex attributes and binding a VBO (Vertex Buffer Object). But I want to create a VAO ...
0
votes
1answer
793 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. ...
2
votes
1answer
285 views

Porting deprecated OpenGL to “modern” issues

In relation to my previous question: Rendering without VAO's & VBO's? I came to realize that i have completely to port the example in modern OpenGL with VAO's and VBO's . So their ...
0
votes
1answer
421 views

Rendering without VAO's & VBO's?

I am trying to port a demo I found on PositionBasedDynamics . It has a generic function which does the rendering and on their example works but they don't generate/bind any Vertex Array Object or ...
1
vote
1answer
648 views

Best strategy on VAO and texture coordinates for voxel rendering?

I'm working on a game that has to render a large amount of cubes (voxels) with OpenGL. All cubes have the same geometry (so I can re-use the vertex position VBO) and a single sprite sheet texture is ...
2
votes
1answer
546 views

When should a VBO be unbind or not?

Searching about VAOs and VBOs I read here and here that I can optionally unbind them to avoid accidental modification so I gave it a try. The problem is that unbinding the VBO causes an access ...
1
vote
0answers
62 views

How should I go about creating a generic Scene object for managing VBO data?

To simplify managing multiple types of data with different shaders and textures, I thought about creating a generic Scene object (is there a name for this?) which ...
4
votes
1answer
4k views

Performance of glDrawElements vs glDrawRangeElements vs glDrawArrays

I've looked around on the web trying to find a good answer to this, but am unable to find one. Different forums mention driver bugs and the likes, but these discussions are usually almost 10 years old,...
25
votes
3answers
14k views

What state is stored in an OpenGL Vertex Array Object (VAO) and how do I use the VAO correctly?

I was wondering what state is stored in an OpenGL VAO. I've understood that a VAO contains state related to the vertex specifications of buffered vertices (what attributes are in the buffers, and what ...
8
votes
4answers
3k views

Is index drawing faster than non-index drawing

I need to draw a lot of polygons consisting of 6 vertices's (two triangles). Without any texture coordinates, normals etc., both approaches result in 72 bytes. In the future I would definitely also ...
1
vote
1answer
1k views

Help me understand this vbo/rotation, and how its done opengl c++

Im pretty new to opengl, and I just cant figure out how to rotate this vbo/vao in 2d space. This is how I bind my coordinates: ...
3
votes
1answer
316 views

Why does glBindVertexArray sometimes fail (but mostly not)?

Quick outline: Test program that loads and displays big (3k x 4k) 16bit gray scale images (ca. 32MB). Using modern OpenGL (eg. 3.3 or so) with shaders VBOs VAOs etc. Running on Windows with OpenTK (...
6
votes
1answer
5k views

OpenGL VBO and VAO Confusion

I would like to present here my Question about VBOs and VAOs. Basically from what i understand you can have different VAOs each of which can contain up to several VBOs , and by binding to the VAO's ID ...
1
vote
1answer
298 views

Confused with how I should organize my code in a 2D game using OpenGL [closed]

I've just now started learning OpenGL and I'm getting very overwhelmed and confused with some things. I don't want to permaturely optimize things, but I also don't make decisions about things I still ...
9
votes
2answers
3k views

2D games and modern OpenGL

Preconcepts Ok, so what I've gathered so far is this: don't use fixed pipeline (deprecated or going to be deprecated) vbos store "object models" (n vertex data, mostly) vaos describe how data is ...
0
votes
3answers
1k 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
2answers
785 views

OpenGL - How to draw each nth triangle using glVertexAttribPointer

I have a vertex buffer. There are situations when I don't want to render the whole mesh, but let's say each nth triangle of the mesh. I am using VAOs and VBOs. My data in the buffer is like this: <...
3
votes
1answer
426 views

Should my GLSL Shader object/wrapper encapsulate loading/setting a VertexArrayObject?

I am working on a 2D game in C++, with a simple rendering layer over OpenGL. I have a wrapper for GLSL shaders and shader programs, these wrappers encapsulate shader objects into C++ classes and ...
0
votes
1answer
459 views

Strange behaviour using VAO (OpenGL 4.0)

I want to display a simple textured Monkey mesh using VAO. Here's the code in the render part first without VAO to see what is the result I'm looking for. ...
5
votes
4answers
983 views

Creating a voxel world with 3D arrays using threads

I am making a voxel game (a bit like Minecraft) in C++(11), and I've come across an issue with creating a world efficiently. In my program, I have a World class, which holds a 3D array of Region ...
5
votes
2answers
4k views

Manage VBO/VAO in a graphic engine

I'm trying to make a 2D Graphic engine for training me. I've actually made it with immediate draw and I've made the renderer outside (so I can switch between OpenGL and DirectX). How can I manage ...