1
vote
1answer
95 views

Vertex shader in OpenGL/GLSL - transformation of the interior of a textured quad

I have a LWJGL project and ran into a problem with a vertex shader I wrote. In my scene I am rendering a map whose ground consists of rectangular tiles. On top of that there are other objects (I used ...
0
votes
1answer
118 views

why is glVertexAttribDivisor crashing?

I am trying to render some trees with instancing. This is rather weird, but before sleeping yesterday night, I checked the code, and it was in a running state, when I got up this morning, it is ...
1
vote
1answer
41 views

vertex is bending inwards

I am trying to draw a picket fence, but the center of the picket vertex looks bent in the middle, why is the picket bending inwards to the left? // draw fence pickets float a; for (a=-25; a<=25; ...
1
vote
3answers
195 views

Is it possible to gain performance by omitting vertex normals in the GPU pipe?

I am working on a rendering problem where I want to render as many raw triangles to the screen as I can with either OpenGL or DirectX with the absolute fastest performance possible. I wondered about ...
0
votes
1answer
316 views

Problems with 3D Array for Voxel Data

I'm trying to implement a voxel engine in C++ using OpenGL, and I've been working on the rendering of the world. In order to render, I have a 3D array of uint16's that hold that id of the block at the ...
3
votes
3answers
437 views

What is the practical use of IBOs / degenerate vertex in OpenGL?

Vertices in 3D models CAN get cut in the process of optimizing 3D geometry, (degenerate vertices) by 3D graphics software (Blender, ...) when exporting because they aren't needed when reusing a vertex ...
0
votes
1answer
215 views

Get world-position in Vertex shader

I'm wondering how I can get the final position of a vertex. I use glTranslate in my render code, and I'm not getting the world-coordinates correct. My world is devided in chunks and my position get's ...
0
votes
1answer
281 views

GLSL Shaders-> How to manage?

As your game get's bigger and bigger, you will use more and more different shader effects. Let's take an easy example: I have clouds in my voxel-based world, and I want to give it a blue-ish tint ...
1
vote
1answer
745 views

How do I create geometry in SceneKit?

I have been experimenting with Apple's new SceneKit for fun, but I cannot seem to figure out how to input vertex data without loading a .dae file. Does anybody who has been testing SceneKit have any ...
6
votes
1answer
263 views

GLSL vertex shaders with movements vs vertex off the screen

If i have a vertex shader that manage some movements and variations about the position of some vertex in my OpenGL context, OpenGL is smart enough to just run this shader on only the vertex visible on ...
7
votes
1answer
513 views

Best practices with Vertices in Open GL

What is the best practice in regards to storing vertex data in Open GL? I.e: struct VertexColored { public: GLfloat position[]; GLfloat normal[]; byte colours[]; } ...
-1
votes
3answers
2k views

Fastest solution to compute normal

A physics engine return a deformed mesh (only geometry vertices). I take this mesh to render the geometry (~500000 vertices). What is the fastest solution and the least expensive to compute normal ...
0
votes
1answer
929 views

How to make a 2D Terrain with opengl?

I want to make a simple 2d terrain with just a few bumps and height changes: I thought about just using random numbers to describe the height of a certain vertex, but I don't see how I can make ...
5
votes
3answers
2k views

OpenGL Vertex Attributes - Normalisation

Alas, I have searched, and have found no definitive answer. When would you normalize the vertex data in OpenGL using the following command: glVertexAttribPointer(index, size, type, normalize, ...