Questions tagged [vertex-attribute]
The vertex-attribute tag has no usage guidance.
15 questions
2
votes
1
answer
220
views
GLSL wrong data read from attribute
I'm developping an OpenGLes 3.0 app with Java and I started writing the shader code. For some reason, it seems to mix up the attributes data locations and I don't understand why. Here's the code :
...
2
votes
1
answer
3k
views
What is the use of multiple vertex color sets
I noticed that Assimp supports meshes with multiple vertex color sets, but what is the use of multiple vertex color sets? I mean are multiple vertex color sets are really used in any games, and if yes,...
1
vote
1
answer
420
views
Puting all vertex attributes of a scene into a single VBO
I'm rendering various elements in OpenGL ES 2 on Android, and I'd like to pack the vertex attributes of the whole scene into a single vertex buffer object (VBO).
My question is, if these objects have ...
0
votes
1
answer
126
views
Easy way to generate colour-per-vertex models for input to Blender
I procedurally generate 3D planet models that I would like to import into Blender.
I use colour per vertex rendering in my shaders (In practice, I use the same colour for all vertices of a face, but ...
1
vote
0
answers
677
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....
0
votes
1
answer
655
views
Turning on Vertex Attribute Divisor With Instanced Rendering Renders Nothing
When I render with glDrawArraysInstanced with the vertex attribute divisor set to zero, the triangle appears as expected. But when the divisor is set to any value other than zero, the triangle ...
0
votes
1
answer
955
views
OpenGL glVertexAttribFormat vs glVertexAttribPointer
I am attempting to change my code from using glVertexAttribPointer to glVertexAttribFormat as I have heard it;s more efficiend ...
2
votes
2
answers
188
views
Easy way to edit vertex attributes
I'm trying to edit large amounts of vertex attributes in my models for my game. The main attributes I really care about are strength (so wind can interact with them) and a couple of other things so ...
1
vote
1
answer
80
views
Combining varying vertex variable and vertex variable in OpenGL. How to? [duplicate]
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 ...
1
vote
1
answer
2k
views
How to pass array of dozens of floats to OpenGL 3.0 vertex shader?
I use PyOpengl and Python 3.
I have 50 thousand vertices. Position of each vertex could be calculated in vertex shader as
...
0
votes
1
answer
750
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, ...
0
votes
1
answer
287
views
OpenGL won't interpret attributes correctly when trying to apply textures
I'm going through open.gl tutorials. I'm at the point where I want to apply textures. The tutorial first introduces texture coordinates to the vertices[] array, and ...
0
votes
1
answer
299
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
0
answers
410
views
How can I set the attribute index location?
I am trying to set up a shader which takes three input parameters. I have the following code:
...
10
votes
2
answers
9k
views
Vertex buffers - interleaved or separate? [closed]
Interleaved - all vertex data (position, normal, texcoord...) kept in 1 vertex buffer, separate - each vertex attribute is kept in a separate vertex buffer (1 for positions, 1 for normals...).
I know ...