Geometry shader

Started by
4 comments, last by Krohm 16 years, 10 months ago
When I make a teapot by glutSolidTeapot() , OpenGL sends the data to the pipeline in triangles, but if I need to pass the data in primitive : GL_TRIANGLES_ADJACENCY_EXT to be able to use the adjacency information in my Geometry Shader, how would I do that?
Advertisement
I don't think you can ask GLUT to use GS primitives - there's no way it could know all those years have gone by.

Previously "Krohm"

If you are referring to the SM4.0 GS, you need a 8800 or 2900 card and GLEE/GLEW with the latest extensions.
Quote:Original post by Krohm
I don't think you can ask GLUT to use GS primitives - there's no way it could know all those years have gone by.


:) that's funny
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Quote:Original post by MARS_999
If you are referring to the SM4.0 GS, you need a 8800 or 2900 card and GLEE/GLEW with the latest extensions.


I have a G80 and have no problems compiling GS programs. I think what I need is a model loader which would send adjacent triangle vertices to the geometry shader.
Quote:Original post by Forrest2006
I have a G80 and have no problems compiling GS programs. I think what I need is a model loader which would send adjacent triangle vertices to the geometry shader.
No, you need less than that. You need to get the parameter to Begin and change it from PRIMITIVE to PRIMITIVE_ADJACENCY_EXT.
Every valid triangle strip will be just ok, it was a specific design decision.

EDIT: ok, not all of them. Most. You know what the extreme cases are, they're in the spec.

Previously "Krohm"

This topic is closed to new replies.

Advertisement