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
0
votes
1 answer

OpenGL changing vertex position

I am using a simple GLsurfaceview to draw a simple white square covering most of the screen. when OnTouchEvent() is triggered the square should expand and de-expand according to the point pressed on screen. This is done by changing the vertex…
JY2k
  • 2,879
  • 1
  • 31
  • 60
0
votes
1 answer

OpenGL: Why these codes draws nothing, with interleaved VBO and GLSL

I've looked many papers and blogs, and I finally reached these code to generate a quad: program stores in gProgram vert shader:--------------------- #version 330 layout(location = 0) in vec3 attrib_position; layout(location = 6) in…
Kee Pan
  • 5
  • 3
0
votes
1 answer

Editing Buffer Data In a Vertex Array

I am trying to write functions that can draw generic shapes without textures. This includes a system for primitive polygon shapes, but as an example I will use show my rectangle function: void Rectangle(float x1, float y1, float x2, float y2); I am…
user1994036
0
votes
3 answers

Vertex information from FBX in XNA, strange results

I'm trying to grab the vertex position data from an fbx file, for testing I'm using a simple plane, it lies in the xz plane and it's 4 vertices are (+/-1, 0, +/-1). The vertex data is confirmed in Maya, which I used to export the plane. Here's my…
0
votes
1 answer

Android opengl es 2.0 Vertex/Index Buffer not working

I've got a shape I'm trying to draw through OpenGL ES 2.0 on Android 3.2. I can get my scene rendering as intended with DrawArrays and a FloatBuffer, but not through glGenBuffers and a vbo/ibo. Here are some snippets I'm using with irrelevant…
user1055947
  • 862
  • 3
  • 9
  • 22
0
votes
4 answers

C# Fastest way to find the index of item in a list

I want to know what is the fastest way to find the index of an item in a list. The reason I want to know is because I am making a XNA render but I started getting out of memory exceptions on larger models when I only used a vertex buffer, so I have…
Gerharddc
  • 3,921
  • 8
  • 45
  • 83
0
votes
1 answer

Understanding vertex buffer and index buffer in game engines

I am new to game engines. I started reading about html5 browser games recently since turbulenz engine became open sourced. Its not difficult to grasp the javascript code and the concepts from the samples. I just wanted to know how the vertex buffers…
gopi1410
  • 6,567
  • 9
  • 41
  • 75
0
votes
2 answers

Dynamic or Static vertex buffer?

I'm writing a directx app and want to overlay a grid on the front of the scene. The grid will possibly update every frame but will be something like 20 horizontal lines and 20 vertical lines (LineList). I'm trying to understand if this situation…
user2152466
  • 59
  • 1
  • 7
0
votes
1 answer

VertexBuffer3d or ExternalInterface is too slow, how can I optimize?

I'm finding some problems uploading a VertexBuffer to the context. This buffer is ~200000 items long and it takes about +15 seconds, apparently the player has some difficulties uploading it to the context. Does anyone experienced this? Any…
Mc-
  • 3,968
  • 10
  • 38
  • 61
0
votes
1 answer

VertexBufferObject with interleaved normals

I have a working Vertex-Buffer-Object but I need to add the normals. The normales are stored in the same array as the vertex positons. They are interleaved Vx Vy Vz Nx Ny Nz This is my code so far: GLfloat values[NUM_POINTS*3 +…
glethien
  • 2,440
  • 2
  • 26
  • 36
0
votes
1 answer

OpenGL Vertex Buffer Object does not work

I have a bunny.h which contains the following data: bunny[] | vertex coordinates xyz NUM_TRIANGLES | the amount of triangles for the bunny normals[] | the normals for each triangle triangles[] | indices for the triangles I want to use the data…
glethien
  • 2,440
  • 2
  • 26
  • 36
0
votes
1 answer

Rendering different triangle types and triangle fans using vertex buffer objects? (OpenGL)

About half of my meshes are using triangles, another half using triangle fans. I'd like to offload these into a vertex buffer object but I'm not quite sure how to do this. The triangle fans all have a different number of vertices... for example,…
DigitalZebra
  • 39,494
  • 39
  • 114
  • 146
0
votes
2 answers

VBO: Array not drawn

I'm following this guide and I'm trying to draw a quad to the screen. I also saw the source code, it's the same and it should work, but in my case nothing is displayed on the screen. I'm using OpenGL 2.0 with a vertex shader that just sets the color…
Ramy Al Zuhouri
  • 21,580
  • 26
  • 105
  • 187
0
votes
0 answers

Drawing using Dynamic Array and Buffer Object

I have a problem when creating the vertex array and the indices array. I don't know what really is the problem with the code, but I guess is something with the type of the arrays, can someone please give me a light on this? #define…
user1905910
  • 162
  • 1
  • 13
0
votes
0 answers

opengl vertex buffer

What is the efficient way of using VertexBuffers? I'm drawing a simple cube (link to code). Ideally it should be such that I load the vertices onto the gpu once and then I don't have to copy them to the gpu everytime(which is what I'm doing inside…
prongs
  • 9,422
  • 21
  • 67
  • 105
1 2 3
21
22