The vertex-arrays tag has no usage guidance.
0
votes
1answer
15 views
Heightmap vertex list to vertex + index list
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:
public class ...
0
votes
1answer
62 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
0answers
77 views
Java lwjgl 3D custom terrain shape
I have a Terrain class that generates a terrain with 2 nested for loops, one for vertices, and one for indices.
for(int i = 0;i < WIDTH;i++){
for(int j = 0;j < HEIGHT;j++){
...
0
votes
1answer
150 views
Avoiding GC when rebuilding Mesh.uv and Mesh.vertices
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 ...
0
votes
1answer
547 views
GL_INVALID_OPERATION on glBindVertexArray Despite glGenVertexArrays()
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 GL_INVALID_OPERATION even though I have ...
0
votes
1answer
50 views
Texture to Painted Vertex Algorithm
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 ...
0
votes
1answer
98 views
How to combine VAO and shader language?
I'm new and trying to draw a very simple quad with VAO and GLSL.
My definitions:
typedef struct SPos
{
float x;
float y;
} SPos;
SPos mVertices[6];
SPos mIndicies[6];
GLuint mVao;
GLuint ...
1
vote
1answer
58 views
Do I have to use vertexArray in opengl
GLuint VertexArrayID;
glGenVertexArrays(1, &VertexArrayID);
glBindVertexArray(VertexArrayID);
As you can see from the above code, some tutorials use this before using opengl. But a tutorial that ...
0
votes
1answer
53 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
0answers
28 views
Generating terrain around more than one point [duplicate]
Ok to get this clear I ALREADY HAVE TERRAIN GENERATION WORKING AROUND A SINGLE POINT all i need it help onto getting it working with multiple points for new players connecting is all i have to do is ...
0
votes
1answer
349 views
Getting access violation because of ID3D11Buffer [closed]
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
hr = g_pd3dDevice->...
0
votes
1answer
239 views
Loading Wavefront Data into VAO and Render It
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 ...
2
votes
3answers
7k views
In Unity, how do I dynamically manipulate parts of a mesh?
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 ...
2
votes
1answer
191 views
Does interleaving in VBOs speed up performance when using VAOs
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 ...
1
vote
2answers
6k views
SFML: Generate a background image
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 sf::Texture like this:
sf::...
0
votes
1answer
256 views
OpenGL Transform Feedback output size
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 ...
1
vote
0answers
174 views
How can I efficiently store Vertex data in C#/XNA?
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 ...
0
votes
2answers
149 views
XNA Game arhitecture, sharing vertices between objects
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 (...
3
votes
3answers
3k views
How to Bind Multiple Shapes/Models to One Vertex Buffer?
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? ...
3
votes
1answer
481 views
Per Instance Textures, and Vertex And Pixel Shaders?
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 ...
3
votes
1answer
5k views
DirectX / Instance Buffer - How To Use Instance Buffers To Enable Reuse of VertexBuffer Data?
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" ...
4
votes
3answers
756 views
OpenGL ES 2.0 - How to batch draw particles that have unique translations, rotations, scales, and alphas?
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 ...
6
votes
2answers
1k views
Vertex data split into separate buffers or one one structure?
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 component (location, normal, texture ...
3
votes
1answer
76 views
How to transform a subset of a vertex in a vertex buffer?
float linePos[6]={0.0f,5.0f,0.0f,0.0f,30.0f,0.0f};
...
glGenBuffers(1, &buffer);
glBindBuffer(GL_ARRAY_BUFFER, buffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(float)*3*2, linePos, ...
1
vote
1answer
305 views
Triangle Strips of Tetraheron
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 ...
0
votes
2answers
908 views
Lighting with VBO
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 (==...
0
votes
4answers
2k views
Should I use a VBO if the vertex data changes from time to time?
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 ...
8
votes
3answers
2k views
What is a better abstraction layer for D3D9 and OpenGL vertex data management?
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 ...
0
votes
1answer
475 views
Refactoring an immediate drawing function into VBO, access violation error
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 ...
2
votes
1answer
1k views
how can I specify interleaved vertex attributes and vertex indices
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 ...
0
votes
2answers
226 views
vertex array with smoothness
I'm using vertex array to draw 2d geometry,
but I can't achieve smoothness.
This is the code I'm using:
glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_VERTEX_ARRAY);
glEnable(GL_BLEND);...
2
votes
2answers
4k views
Using index arrays with OpenGL VBOs
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 ...
5
votes
2answers
1k views
Generating geometry when using VBO
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 ...
3
votes
2answers
2k views
How to create per-vertex normals when reusing vertex data?
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,...
2
votes
1answer
719 views
Beginner question about vertex arrays in OpenGL
Is there a special order in which vertices are entered into a vertex array? Currently I'm drawing single textures like this:
glBindTexture(GL_TEXTURE_2D, texName);
glVertexPointer(2, GL_FLOAT, 0, ...