Questions tagged [vertex-arrays]
The vertex-arrays tag has no summary.
46 questions
1
vote
1
answer
703
views
What is a efficient way for adding and removing vertices and indices in C++?
So I have this middle-large mesh that is composed from vertices and respective indices. At some point I need to add new ones and remove some. But that brings me into trouble. Because if I have, for ...
2
votes
0
answers
111
views
Tell if two polygons are colliding
I want to make a function like areColliding which takes two polygons as args.
I also want to cover cases like
and the dreaded
because I am trying to create a ...
1
vote
0
answers
768
views
OpenGL VAO buffer rebinding vs binding switching
I'm considering two different approaches to vertex buffer management in my OpenGL game engine. The first one seems to be pretty usual, but I haven't seen the second one being proposed or used anywhere....
1
vote
1
answer
2k
views
VAO and VBO connection and granularity with multiple objects
How general should vertex array objects be?
I'd like to plan ahead and avoid a major revision down the road. I'm having a hard time wrapping my head around a few (possibly conflicting) pieces of ...
1
vote
0
answers
193
views
SFML 2.4's RectangleShape is running slow when rendered multiple times
I am creating a level for my game and currently, there is a Tile class where I have a black RectangleShape rendering without any weirdness, except when I look at the FPS, its 200. Now, I have a pretty ...
2
votes
1
answer
407
views
What to do with unused vertices?
Imagine yourself a vertex array in OpenGL representing blocks in a platform game.
But some vertices may be not used.
The environment is dynamic, so there always some vertex may suddenly become ...
0
votes
1
answer
445
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
1
answer
823
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, ...
3
votes
2
answers
7k
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 ...
0
votes
1
answer
247
views
How to combine VAO and shader language?
I'm new and trying to draw a very simple quad with VAO and GLSL.
My definitions:
...
0
votes
1
answer
363
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 ...
0
votes
1
answer
551
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 ...
2
votes
1
answer
697
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 ...
0
votes
1
answer
379
views
OpenGL Transform Feedback output size
I'm working on a particle system using transform feedback, and I would like to know if it is possible to render to anything other than floats, like halfs, using Transform Feedback (OpenGL 3.3)? It ...
0
votes
2
answers
214
views
XNA Game arhitecture, sharing vertices between objects
I'm practicing primitives rendering in XNA and I want to create something like pipe or tunnel.
I have base class called PipeSegment from which I inherit classes like RotatingSegment and NormalSegment (...
3
votes
1
answer
1k
views
Per Instance Textures, and Vertex And Pixel Shaders?
How do you implement per instance textures, vertex shaders, and pixel shaders?
Given:
1. Two different model templates in Vertex Buffer, Square & Triangle
2. Instance Buffer with [n] instances of ...
4
votes
3
answers
958
views
OpenGL ES 2.0 - How to batch draw particles that have unique translations, rotations, scales, and alphas?
I've combined all of my vertex data for many particles into a single array. How would I batch draw all of those particles in a manner that preserves their unique translations?
Any code examples ...
3
votes
1
answer
169
views
0
votes
2
answers
1k
views
Lighting with VBO
INTRO
I'm using a Java JOGL wrapper called processing.org and I have coded some environment on it and I'm quite proud of it even if it has some library stuff that I didn't know anything about it (==...
8
votes
3
answers
3k
views
What is a better abstraction layer for D3D9 and OpenGL vertex data management?
My rendering code has always been OpenGL. I now need to support a platform that does not have OpenGL, so I have to add an abstraction layer that wraps OpenGL and Direct3D 9. I will support Direct3D 11 ...
2
votes
1
answer
2k
views
how can I specify interleaved vertex attributes and vertex indices
I'm writing a generic ShaderProgram class that compiles a set of Shader objects, passes args to the shader (like vertex position, vertex normal, tex coords etc), then links the shader components into ...
2
votes
2
answers
5k
views
Using index arrays with OpenGL VBOs
I've recently started reading about VBOs.
If, for example, I want to draw a cube using VBOs, can I use one VBO to hold the coordinates for the 8 vertices, and another one as an index array, to ...
4
votes
3
answers
3k
views
How to create per-vertex normals when reusing vertex data?
I am displaying a cube using a vertex buffer object (gl.ELEMENT_ARRAY_BUFFER). This allows me to specify vertex indicies, rather than having duplicate vertexes. In the case of displaying a simple cube,...