When I apply a vertex and a frag shader I achieve sucess:
Info log:
Vertex shader was successfully compiled to run on hardware.
Fragment shader was successfully compiled to run on hardware.
And the display is as I want.
Then when I attach my geometric shader
ARBShaderObjects.glAttachObjectARB(shader, gShader);
All is well, getting a:
Geometry shader was successfully compiled to run on hardware.
However the display which was a quad (cube to be more precise) is now nothing!
Here's my shaders (Vertex, Frag, Geometry displayed respectivly):
varying vec4 vertColor;
void main(){
gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex;
vertColor = vec4(1.0, 0.3, 0.4, 1.0);
}
varying vec4 vertColor;
void main(){
gl_FragColor = vertColor;
}
#version 120
#extension GL_EXT_geometry_shader4 : enable
void main() {
int i;
for(i = 0; i < gl_VerticesIn; i++) {
gl_Position = gl_PositionIn[i];
EmitVertex();
}
EndPrimitive();
}
And I'm preety sure its the gemotric shader causing the issue as I'm getting colored fragments with just vert + frag (Proper response).
Other notes. I've done:
System.out.println(GLContext.getCapabilities().GL_EXT_geometry_shader4);
And the answer is true, so I'm assuming its not my gpu isn't the issue. Any idea's LWJGL gurus?