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

unable to render with array buffers in Java with LWJGL

I'm attempting to learn how to program in OpenGL the modern way, using vertex array/vertex buffer objects. I'm using the tutorials on the LWJGL wiki right now, and even if I copy & paste the tutorial code, I get a window with the background colour…
Eric Dubé
  • 472
  • 1
  • 4
  • 12
0
votes
2 answers

Whats Wrong With This HLSL Shader ?

What am I Doing Wrong ? if I Compile This Get an Error cbuffer MatrixBuffer { matrix worldM; matrix viewM; matrix projectionM; }; struct VertexInput { float4 position : POSITION; float4 color : COLOR; }; struct PixelInput { …
user3460574
0
votes
1 answer

Interleaved Vertex buffer does not render correctly

I'm in the process of writing a bit of code to load some models, as a part of this I want to add interleaved vertex data to a VBO, however I've noticed some strange behavior when I try to add the data to the Vertex Buffer, a couple of the submeshes…
Mark
  • 15
  • 4
0
votes
1 answer

Why do i get gradient colored lines when using vertexbuffer?

I'm making something like a CAD/CAM software using OpenGL. at first I simply used glBegin and glEnd, it works fine but it gets slow when there are lot of vertices, so I did my search and found there is something called vertexbuffer. so I made a…
user1748906
  • 526
  • 4
  • 13
0
votes
1 answer

Using textures with vertexBuffer not working

I am trying to use a texture mapping buffer together with a vertex buffer and it's not working. I am working with lib3ds to load 3DS models. I've searched everywhere and I a can't see any error with my code. I think the error is somewhere in the…
affonseca
  • 1
  • 2
0
votes
1 answer

lighting vbo using gllightfv and glmaterialfv

I created a program that plotted 3D data as a surface. Defined 3 point lighting [key/back/fill] with glLightfv(GL_LIGHT0, GL_POSITION, light0_position); glLightfv(GL_LIGHT2, GL_POSITION, light2_position); glLightfv(GL_LIGHT0, GL_DIFFUSE,…
user3591811
  • 95
  • 1
  • 1
  • 7
0
votes
2 answers

VBO draws nothing

I'm trying to render my stored data using VBOs. However, nothing is actually rendered, although no error is thrown by glGetError(); void Model::initDrawing() { glewInit(); glGenBuffers(1, &_bufferID); glBindBuffer(GL_ARRAY_BUFFER,…
sjaustirni
  • 3,056
  • 7
  • 32
  • 50
0
votes
1 answer

Vertex Buffer Creating a Sqaure

I'm trying to create a square using this tutorial here, http://www.braynzarsoft.net/index.php?p=D3D11BD: However I'm having trouble creating the second triangle... see below bool InitScene() { //Compile Shaders from shader file hr =…
Fudgey
  • 3,793
  • 7
  • 32
  • 53
0
votes
0 answers

glDrawElements rendering elements deformed

So far I tried to render mesh using vertex buffer and index buffer. Using packed buffer with data order : PosX,PosY,PosZ,NormX,NormY,NormZ,TexX,TexY but when it comes to render low poly model like triangle or plane doesn't render and cube renders…
user2977027
  • 105
  • 1
  • 10
0
votes
1 answer

Get object indices

I got mesh loaded from .obj file o Plane_Plane.002 v 1.000000 0.000000 1.000000 v -1.000000 0.000000 1.000000 v 1.000000 0.000000 -1.000000 v -1.000000 0.000000 -1.000000 vt 0.000100 0.000100 vt 0.999900 0.000100 vt 0.999900 0.999900 vt 0.000100…
user2977027
  • 105
  • 1
  • 10
0
votes
1 answer

Making OpenGL animation faster

I want to animate my GL_LINE_STRIP vertex by vertex. Here is how I do it now (inefficiently): void renderFunc() { glDrawElements(GL_LINE_STRIP, testCount, GL_UNSIGNED_INT, (GLvoid*)0); if ( testCount < verts.size() ) testCount++; } However,…
TheBlindSpring
  • 631
  • 5
  • 22
0
votes
1 answer

OpenGL Partial Drawing

I am working with OpenGL and I am pretty close to where I want to be. I am using VBO's however for some reason my picture is only drawing about half of its vertices (GL_LINE_STRIP). If I change the line: glVertexAttribPointer(0, 4, GL_FLOAT,…
TheBlindSpring
  • 631
  • 5
  • 22
0
votes
1 answer

OpenGL VBO Troubles

Okay, so I am trying to learn OpenGL. I have successfully followed an example to render a triangle. So I tried to move on, and instead of using the vertices provided in example, I tried to read in the vertices from a file (arbitrary number of…
TheBlindSpring
  • 631
  • 5
  • 22
0
votes
1 answer

Error creating vertex buffer

I have an error while creating vertexbuffer Here is my code: bool ColorShaderClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsFilename, WCHAR* psFilename) { HRESULT result; ID3D10Blob* errorMessage; ID3D10Blob*…
Oleksandr Verhun
  • 814
  • 1
  • 8
  • 23
0
votes
1 answer

LWJGL Indexed VBO, a lot of confusion

I cannot figure out how to use an Indexed VBO, IMHO there's a lack of information about it (for example the lwjgl site in which the indexed vbo page is missing ATM). The structure i'm using in my vertex buffer is {pos.x, pos.y pos.z}, {tex.u, tex.v…
Mk3Y
  • 35
  • 5