71 questions
2
votes
1
answer
103
views
How do I fix the System.AccessViolationException?
I am trying to make a square from triangles using indices and vertices, but when I run the code it says this: System.AccessViolationException: 'Attempted to read or write protected memory. This is ...
0
votes
1
answer
803
views
Moderngl: Render VAO with multiple shaders
I'm doing some stuff with 2D opengl rendering.
Is there a way to render a vertex array object but have the data be passed through multiple shaders? For example, a shader that applies a normal map to ...
1
vote
1
answer
95
views
How to refactor code from Vertex Array to Vertex Array Object methods
I'm studying Opengl and the book i've been using is OpenGL(R) ES 3.0 Programming Guide, 2nd Edition. And at chapter 6 they talk about Vertex arrays and they have a example code that uses Vertex Array ...
1
vote
1
answer
66
views
Why is my code not displaying on phone emulator with vertex array object in opengl
I'm new to this but what I'm trying to do is using vertex array object to display something on a phone emulator. But the problem is that it isn't displaying anything on the phone.
What I have ...
9
votes
2
answers
4k
views
Vertex Array Objects - Confusion regarding exactly what state information is saved about the currently bound vertex buffer
I'm working through the excellent tutorials at arcsynthesis while building a graphics engine and have discovered I don't understand VAOs as much as I thought I had.
From the tutorial Chapter 5. ...
3
votes
1
answer
2k
views
Why should I bind the index buffer to draw elements with a VAO?
I use the following code to render a simple quad using a vertex array and an index buffer.
In the Vertex specification, I see
The index buffer binding is stored within the VAO.
But in my code, in ...
0
votes
1
answer
926
views
Draw multiple buffers with the same vertex layout
I have multiple objects, each one of them has its own index buffer, vertex buffer, some have a different shader or texture, and all of them have the same vertex format (x, y, z, u, v, nx, ny, nz). I ...
3
votes
1
answer
218
views
Can I glDeleteBuffer a VBO and IBO after binding to a VAO?
I've read that a VBO (Vertex Buffer Object) essentially keeps a reference count, so that if the VBO's name is given to glDeleteBuffers(), it isn't truly dismissed if a living VAO (Vertex Array Object) ...
-1
votes
2
answers
475
views
GL_POLYGONS does not work how do i get my function to work
I have been experimenting with modern OpenGL and I am trying to make draw functions to automate drawing basic shapes I have done quads successfully but I can't get circles to work my code is good ...
0
votes
1
answer
573
views
update vertices and indices in OPENGL
hi everyone I new to OPENGL and I want to update the vertices and indices when I translate the 3d object I make vertices vector and indices vector these vector hold all the data of the 3d object is ...
1
vote
0
answers
161
views
Why do I get an 'invalid operation error' when I use glGenVertexArrays() in PyOpenGL eventhough I am creating an OpenGL 4.1 context? [duplicate]
I'm trying to write a simple program to display an icosahedron using PyOpenGL but I can't get past generating the VAO. The problem is not solved in glGenVertexArrays Mac OSX PyOpenGL as I am creating ...
0
votes
1
answer
946
views
Using multiple VBO in a VAO
I try to use 2 VBO inside a VAO and I end up with a crash (far beyond my app).
The idea is to make a first VBO (and optionnally an IBO) to stucture the geometry.
This worked well, until I get the idea ...
-2
votes
1
answer
630
views
Error when calling GL30.glGenVertexArrays();
i am trying to learn usinf opengl and lwjgl with java and i have amde a program and am trying to render some mesh but the class handling the Vaos and Vbos is faulty.After doing some research , i have ...
0
votes
1
answer
382
views
When drawing multiple objects, when do you create a new vertex array object?
I'm trying to create a game with WebGL.
I currently have three textures, one with letters for the font, a sprite sheet for the character, and a tilemap for the world. So I have a few large textures ...
0
votes
1
answer
2k
views
OpenGL Draw Multiple Vertex Arrays
I want to draw multiple vertex arrays. This is the initialization:
unsigned int va1;
unsigned int vb1;
void init_va1() {
glGenVertexArrays(1, &va1);
glBindVertexArray(va1);
...