Questions tagged [vertex-buffer]

A Vertex Buffer is an object that enables transmitting a collection of vertices to a graphics device for non-immediate or streaming rendering.

A Vertex Buffer is an object that enables transmitting a collection of vertices to a graphics device for non-immediate ot streaming rendering.

Examples are OpenGL's Vertex Buffer Object and Microsoft.XNA VertexBuffer class.

329 questions
2
votes
1 answer

OpenGL - Can I draw non-indexed when index-buffer is set for VAO?

I set up a VAO, binding vertex-buffers to it for vertex attributes, but also set index-buffer (With glVertexArrayElementBuffer). Does that restrict it so it only works with glDrawElements type of commands, or will it work with glDrawArrays…
Newline
  • 769
  • 3
  • 12
2
votes
2 answers

PIX Call that Previously Succeeded Failed During Playback error on IASetVertexBuffers()

I'm trying to debug the shaders in a SlimDX DirectX11 game I've been coding for a while. The code runs fine and executes without a hitch (albeit seemingly ignoring my textures) and when I run an experiment to capture a single frame inside PIX it…
Nick Udell
  • 2,420
  • 5
  • 44
  • 83
2
votes
2 answers

How many vertex buffers is too many?

Newer API's like D3D11 force use of vertex buffers. You can use static (contents don't change) or dynamic vertex buffers (contents can be updated and changed by CPU). My question is, how many vertex buffers is too many? How do you know you are…
bobobobo
  • 64,917
  • 62
  • 258
  • 363
2
votes
1 answer

Uploading Vertex and Index buffer to the GPU

I am creating a terrain engine and currently I am uploading the whole terrain VB (Vertex Buffer) and IB (Index Buffer) to the GPU at once since the terrain is not huge. It's 256x256 at the moment. Now, let's say I want to create a procedural terrain…
Jón Trausti Arason
  • 4,548
  • 1
  • 39
  • 46
2
votes
1 answer

Fastest way to draw dynamic GL_TRIANGLE_STRIP

After some effort, I managed to draw dynamic aircraft trail using OpenGL. You may see a part of my code below: private void getTrailVertices(){ verticeBuffer = Buffers.newDirectFloatBuffer(6 * positionList.size()); for (int i = 0; i <…
2
votes
1 answer

OpenGL Index Buffer Object element order incorrectly drawn

Notice how my program draws a single triangle, but instead what I am trying to express in code is to draw a square. My tri_indicies index buffer object I believe correctly orders these elements such that a square should be drawn, but when executing…
greg
  • 1,118
  • 1
  • 20
  • 40
2
votes
0 answers

OpenGL VAO + multiple VBO - theory - batch render

I'm thinking about tweaking my current batch render. What I currently do is run a loop with command like this : shader->setUniformValue("mvp_matrix", matrix * geo[x].geoMatrix); glDrawElementsBaseVertex(GL_TRIANGLES, meshIndicesCountList[x],…
2
votes
1 answer

OpenGL vertices array initialisation

I have a question about OpenGL 3.0, why am I unable to draw anything when my array of vertices in initialized as float * vertices; int size = 100; // size of the vertices array float * vertices = (float *) malloc (size*sizeof(float)); I have…
Mn9
  • 85
  • 6
2
votes
1 answer

OpenGL Depth Buffer Problem

For my last few projects I have been using some of the utility files that I found whilst looking at a few demos here. Namely a file called opengl.h - mainly used to manage shaders a bit like glew and another file gl_font. gl_font is a class they use…
henryprescott
  • 483
  • 4
  • 19
2
votes
1 answer

What is the most efficient way to send my geometry to glsl?

In my scene I have a tree of meshes. Each mesh contains a transformation matrix, a list of vertices, normals, uvs and a list of child meshes. I would like to send my geometry in an 'array of structures' to glsl using a VBO, but I don't know how to…
schellsan
  • 2,164
  • 1
  • 22
  • 32
2
votes
1 answer

OpenGL: glDrawElements gives unhandled exception: System.AccessViolationException

Using OpenTK with VB.Net. My render method: ' clear the screen GL.ClearColor(Color4.Purple) GL.Clear(ClearBufferMask.ColorBufferBit Or ClearBufferMask.DepthBufferBit) ' activate shader program and set uniforms shaderProgram.Use() …
Tushar Pandey
  • 59
  • 1
  • 6
2
votes
0 answers

OpenGL ES2.0 Unable to generate proper sphere vertices with texture coordinates in a function in Android java

I am trying to run video on 3d surfaces in android. I am able to run it properly on a squareso I proceeded for a sphere. I found multiple algorithms and functions to generate sphere vertices and tex coords with or without indexes and tried…
2
votes
1 answer

Rotate individual polygons in an Open GL vertex array?

I am working on a game for Android using OpenGL ES, and I have run into a performance problem. What I am trying to do: I have a bunch of objects on screen that all share the same mesh, but all have individual rotations and translations. You could…
David Pettersson
  • 368
  • 2
  • 11
2
votes
2 answers

Texturing Vertex Buffer Objects

What I want to do is drawing a (large) terrain with OpenGL. So I have a set of vertices, lets say 256 x 256 which I store in a vertex buffer object in the VRAM. I properly triangulated them, so I've got an index buffer for the faces. //…
Stefan Teitge
  • 716
  • 3
  • 10
  • 21
2
votes
1 answer

OpenGL big projects, VAO-s and more

So I've been learning OpenGL 3.3 on https://open.gl/ and I got really confused about some stuff. VAO-s. By my understanding they are used to store the glVertexAttribPointer calls. VBO-s. They store vertecies. So if I am making something with…
Rokner
  • 169
  • 2
  • 13