Which using a the following vertex and fragment shader works perfectly. But when the geometry shader comes in I get nothing. I've tried all kinds of combination but it still gives me absolutely nothing as output. Anyone got ideas what I am doing wrong?

I've tried passing the colour through from vertex-geom-fragment, varying inputs, not using an MVP transform and all kinds of things. Am I missing something vital with this simple setup? I'm not setting up and glProgramParameteri because I assumed they were not necessary with geom layouts.

Still hunting...

Good thinking. It seems like I am actually getting error code 0x502 which is GL_INVALID_OPERATION when drawing this shape. I tried to create a minimal working example but I don't really know what I am doing wrong at this point. Been doing trial and error the last 2 days without luck. Here's the code in it's entirety:

It works perfectly without the geometry shader but with it I get error 0x502. How would I go about hunting this down? Could it somehow be that geometry shaders are not supported on my GPU or something similarly silly?

It works perfectly without the geometry shader but with it I get error 0x502. How would I go about hunting this down?

Find which command generates the error. Set a breakpoint inside check_errors() when, then start adding more calls. Once you've identified the command (a call to check_errors() immediately before it succeeds, a call immediately after reports an error), refer to its documentation in the reference pages or (preferably) the specification to see the conditions which can cause that particular error.

Originally Posted by planetexp

Could it somehow be that geometry shaders are not supported on my GPU or something similarly silly?

* Learn how to introspect GL state. You're checking errors, compile state, and link state. But not the object state; glGetProgram will tell you everything about your linked program (like how many shaders are attached to it). glValidateProgram's log in this case would have helpfully informed you: "Validation Failed: Program does not contain fragment shader. Results will be undefined."