Noctune's picture

Pass-through geometry shader for points in OpenGL 3.3

Basically this is a continuation of my problem I wrote about on stackoverflow, where my simple pass-through geometry shader would remove all points.

I am doing this on the gl4 branch, so that might have something to do with it. Also, I am using .Net 4.

This is the geometry shader that I have now and it completely removes all points instead of just passing them through:

#version 330
precision highp float;
 
layout (points) in;
layout (points, max_vertices=1) out;
 
void main(void)
{
	gl_Position = gl_in[0].gl_Position;
	EmitVertex();
	EndPrimitive();
}

The problem only occurs when this shader is linked, if it isn't the points show up as expected. At first I suspected it to be a ATI driver bug, but it happens on NVidia cards as well, so that is pretty unlikely.

You can download the program here together with the shaders, and the full source code of the program can be seen here.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Noctune's picture

I managed to get it working, if anyone else is having a similar problem, see the answer in stacoverflow link I posted.