Skip to main content

Questions tagged [vertex-arrays]

Filter by
Sorted by
Tagged with
1 vote
1 answer
705 views

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 ...
Janis Taranda's user avatar
1 vote
1 answer
122 views

I've got a pretty simple tile based 2d top-down map with an array of walls. In order to figure where to cast light and shadows, I've generated an array of vertex coordinates along the walls like so: ...
q11's user avatar
  • 11
2 votes
0 answers
111 views

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 ...
user avatar
0 votes
2 answers
406 views

So I was watching Cherno's Video on Vertex attributes and he was successful in drawing a triangle without a VAO, but in tutorials from learnopengl.com they specifically say they we need a VAO to draw ...
Pikachuxxx's user avatar
1 vote
0 answers
769 views

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....
Jacajack's user avatar
  • 111
1 vote
1 answer
5k views

I'm newbie with Unreal Engine 4. I need to create a function which calculates the volume of a mesh, based on the following example: https://n-e-r-v-o-u-s.com/blog/?p=4415 To achieve that I created ...
Jean-Milost Reymond's user avatar
1 vote
1 answer
2k views

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 ...
Felix's user avatar
  • 123
0 votes
1 answer
260 views

During my developing, I always spend much time to fill up my vertex array by coding every vertex information when I have to create some complex models. It's quite inconvenient. It's will be very ...
tedyage's user avatar
  • 23
1 vote
0 answers
194 views

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 ...
Ameer Ali's user avatar
1 vote
1 answer
112 views

Let's say I have 2 triangles sharing an edge defined by 4 vertices. Though the normals for these 2 triangles are unique for each triangle and are defined per vertex. So say I have 4 vertices, 6 ...
user18490's user avatar
  • 132
2 votes
1 answer
407 views

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 ...
Franz Wexler's user avatar
23 votes
2 answers
23k views

While refreshing my mind on OpenGL ES, I came across glDrawArrays and glDrawElements. I understand how they are used and sort ...
Unheilig's user avatar
  • 525
0 votes
1 answer
446 views

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 ...
simulate's user avatar
  • 145
0 votes
1 answer
469 views

Right now I'm trying to load a heightmap into my LWJGL application. I load it like that into a float[][] array and I can read the height value at a given x and z position in the map: ...
kessler bebe's user avatar
0 votes
1 answer
825 views

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, ...
LLL's user avatar
  • 3
0 votes
1 answer
1k views

Since unity will not allow users to iterate over mesh.uv and mesh.vertices, I am stuck having to use GC intensive calls when applying an array of uvs and vertices to a mesh. I run into high GC ...
Euthyphro's user avatar
  • 237
3 votes
2 answers
7k views

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 ...
Moo's user avatar
  • 352
0 votes
1 answer
109 views

I want to generate some game textures into coloured vertex arrays. Is there a known algorithm to transform texture/bitmap data into an optimised vertex array. Much like how the Homeworld skyboxes ...
PhilCK's user avatar
  • 590
0 votes
1 answer
247 views

I'm new and trying to draw a very simple quad with VAO and GLSL. My definitions: ...
LongLT's user avatar
  • 117
1 vote
1 answer
106 views

GLuint VertexArrayID; glGenVertexArrays(1, &VertexArrayID); glBindVertexArray(VertexArrayID); As you can see from the above code, some tutorials use this ...
Ozum Safa's user avatar
  • 111
0 votes
1 answer
364 views

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 ...
Moritz Gunz's user avatar
0 votes
1 answer
1k views

I try to create a simple class store my model variables vertex array and vertexbuffer. So I create an array of myclass to create and manage object dynamically. But when ...
Hakan SONMEZ's user avatar
0 votes
1 answer
552 views

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 ...
Jordan LaPrise's user avatar
3 votes
3 answers
16k views

I'm trying to achieve mesh manipulation of any mesh based on user input (mostly sliders). Here's an example of what I want. I am not sure whether to call this "morphing", as I am trying to change one ...
TJ'S's user avatar
  • 31
2 votes
1 answer
698 views

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 ...
Merni's user avatar
  • 247
1 vote
2 answers
13k views

I want to generate a background, which is used in the game, on every instance of the game based on certain conditions. To do so, I'm using a sf::RenderTexture and a ...
BlackMamba's user avatar
0 votes
1 answer
380 views

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 ...
user1032861's user avatar
1 vote
1 answer
371 views

I am creating a terrain system using voxels in a somewhat minecraft-like style and I was wondering if there was anything I could do to increase the number of vertices I am able to store (and therefore ...
Bob's user avatar
  • 11
0 votes
2 answers
215 views

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 (...
Nikola Ninkovic's user avatar
3 votes
3 answers
7k views

If I have two Vertex Arrays, one for Square, and one for Triangle; what is the best way to bind them to the VertexBuffer? What are the patterns used to write multiple vertices to the VertexBuffer? ...
Wind And Flame's user avatar
3 votes
1 answer
1k views

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 ...
Wind And Flame's user avatar
5 votes
1 answer
12k views

I created a simple Model framework in C++ 11 so that the same model can be rendered in different parts of a scene. What I am trying to figure out is how to reference VertexBuffer data already "set" ...
Wind And Flame's user avatar
4 votes
3 answers
959 views

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 ...
BigSauce's user avatar
  • 191
7 votes
2 answers
4k views

Is it better to have all vertex data in one structure like this: class MyVertex { int x,y,z; int u,v; int normalx, normaly, normalz; } Or to have each ...
kiba2's user avatar
  • 71
1 vote
1 answer
616 views

I am confused about the triangle strip representation of closed mesh .The vertex buffer for triangle strip representation of the a figure is shown below: A(0,1) B(0,0) C(1,1) D(1,0)E(2,1) vertex ...
gangcil's user avatar
  • 13
0 votes
2 answers
1k views

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 (==...
nkint's user avatar
  • 961
0 votes
4 answers
2k views

If I have a very large number of vertices, but they're static for about 70% - 80% of their life time, should I use a VBO for them? If so, what usage should I specify? This doesn't sound like a case ...
rid's user avatar
  • 189
8 votes
3 answers
3k views

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 ...
sam hocevar's user avatar
0 votes
1 answer
617 views

I have a MD2 model loader, I am trying to substitute its immediate drawing function with a Vertex Buffer Object one.... I am getting a really annoying access violation reading error and I can't ...
Alex's user avatar
  • 103
2 votes
1 answer
2k views

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 ...
user avatar
0 votes
2 answers
265 views

I'm using vertex array to draw 2d geometry, but I can't achieve smoothness. This is the code I'm using: ...
nkint's user avatar
  • 961
2 votes
2 answers
5k views

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 ...
adivasile's user avatar
  • 757
5 votes
2 answers
1k views

Currently I am working on a project in which I generate geometry based on the players movement. A glorified very long trail, composed of quads. I am doing this by storing a STD::Vector, and removing ...
onedayitwillmake's user avatar
4 votes
3 answers
3k views

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,...
Chris Smith's user avatar
2 votes
1 answer
812 views

Is there a special order in which vertices are entered into a vertex array? Currently I'm drawing single textures like this: ...
MrDatabase's user avatar
  • 1,951