110 questions
0
votes
0
answers
98
views
Updating a Vertex Array Tile Map?
I m trying to learn creating tilemap with vertex array.
I found a code from a tutorial and i read its necessary to use vertex array for creating huge tilemaps if we need optimal rendering performance ...
0
votes
1
answer
294
views
Unsure why 3x3 matrix as a vertex attribute in GLSL is not working
I am trying to make a simple 2D rectangle renderer in OpenGL. I'm storing transform of each rectangle as a 3x3 matrix inside a buffer object, and passing into my vertex shader as a vertex attribute. ...
1
vote
1
answer
95
views
How to refactor code from Vertex Array to Vertex Array Object methods
I'm studying Opengl and the book i've been using is OpenGL(R) ES 3.0 Programming Guide, 2nd Edition. And at chapter 6 they talk about Vertex arrays and they have a example code that uses Vertex Array ...
0
votes
0
answers
190
views
How would I draw a circle using an SFML vertex array?
For a university assignment, I need to draw various shapes using a vertex array, and one such shape that they have asked for is a circle.
I know that I would need to use sf::TriangleFan but I'm not ...
3
votes
1
answer
217
views
Rendering different models (with their own ELEMENT_ARRAY_BUFFER) without changing which VAO is used
I am trying to render multiple models sharing the same VAO and vertex format (following top answer on this post Render one VAO containing two VBOs), however I cannot get it to work with ...
2
votes
1
answer
727
views
Plane geometry, each segment different color, some of them transparent
I am using three.js and I want to create geometry 16x16 size. I want that each segment is different color and some of them is transparent. What is the best solution for this problem?
Should i render ...
1
vote
1
answer
270
views
c++ with openGl can't render
I try to make the code cleaner by extracting the whole main Proramm in some classes. So I have a vertex buffer, index buffer and a shader class. Only the array buffer is in the main and it worked.
Now ...
2
votes
1
answer
953
views
How do I get the indices of a vertex type object in ABAQUS?
Context:
I am trying to make a script in Abaqus that will automatically create partitions between vertices for all faces. The partitioning won't be perfect, but the users will be able to delete the ...
2
votes
1
answer
627
views
Is it ok to render Raycasting using vertex array?
Im making simple fps game using raycasting, because I thought its very fast and light method.
My Raycasting function saves data in to a vertex array, which is then rendered by OpenGl.
But because this ...
-2
votes
1
answer
630
views
Error when calling GL30.glGenVertexArrays();
i am trying to learn usinf opengl and lwjgl with java and i have amde a program and am trying to render some mesh but the class handling the Vaos and Vbos is faulty.After doing some research , i have ...
1
vote
0
answers
83
views
Motion field display on tile map SFML
I've tried to write a code that will draw a motion field by drawing green rectangles on a tile map everywhere where hero can go (hero can't move diagonally). It's very hard to me I have read: https://...
2
votes
1
answer
226
views
Corrupted data in vertex shader attribute location
My model looks stretched because of corrupted data in vertex shader attribute location
Here's the vertex shader code:
#version 330 core
layout (location = 0) in vec3 vertPos;
layout (location = 1) in ...
1
vote
1
answer
2k
views
C++ OpenGL, why isn't the vertex array binding the vertex buffer?
I'm pretty sure that the vertex array is not binding the vertex buffer because if I comment out the line where I unbind the vertex buffer it works perfectly fine, which suggests that the vertex array ...
2
votes
1
answer
283
views
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 * ...
1
vote
0
answers
92
views
How to assemble wavefront .obj data into element and vertex arrays of minimal size?
I'm having trouble putting the data inside a wavefront .obj file together.
These are the vec3 and vec2 definitions
template <typename T>
struct vec3 {
T x;
T y;
T z;
};
template &...