opengl,geometry-shader,vertex-attributes

You are using the incorrect function to establish a vertex attribute pointer for thickness. glVertexAttribPointer(thicknessAttribLocation, 1, GL_UNSIGNED_INT, GL_FALSE, sizeof(Vertex), (void*)(3 * sizeof(float))); Thickness has type int, and you are using glVertexAttribPointer (...). That function is designed to convert your vertex data to floating-point and is only suitable for float, vec<N>...

directx,hlsl,normals,geometry-shader

I assume that your input vertices' positions are already transformed to clip space. Then, at least you're calculating lighting in the same space. However, clip space is not suited for lighting calculations because perspective transforms are not angle-preserving. Either do the calculations in world or in view space. In either...

You can test yourself, but in general, the geometry shader will slow things down rather than speed things up. From what I understand, AMD GPUs have a special case for geometry shaders which always output exactly 4 vertexes (true in this case) and the Intel GPUs can have fast geometry...

opengl,opengl-3,geometry-shader

Outputting fans in a Geometry Shader is very unnatural as you have discovered. You are currently outputting the vertices in fan-order, which is a construct that is completely foreign to GPUs after primitive assembly. Fans are useful as assembler input, but as far as output is concerned the rasterizer only...

The following diagram comes from the D3D10 documentation, but I feel it conveys primitive topology better than the diagrams in the OpenGL specification. What you need to understand is that when you use a primitive type w/Adjacency (e.g. GL_LINE_STRIP_ADJACENCY) you actually have to supply additional data in your index...

shader,direct3d,hlsl,geometry-shader

You do know how many vertices it will take ("take" as in input) per-invocation. That is defined by the primitive topology; a triangle (strip), for instance takes 3 and triangle adjacency takes 6. MaxVertexCount absolutely has to be known, because there is an implementation limit to the number of vertices...