PDA

View Full Version : Tessellation -> very begginner question



stefano_brix
09-15-2014, 03:08 PM
Hello, I'm trying to follow the code explained on OpenGL superbible book...

..there is a basic code for tessellation demonstration, it have to figure out a triangle through VertexShader -> TessellationControlShader -> TessellatioEvaluationShader -> FragmentShader.

The triangle at the must be filled with a lot of subtriangle...

..the way to figure it out is to call :

glDrawArrays(GL_PATCHES,0,3);

What happen is an empty window...and i get an exception : "GL_INVALID_ENUM error generated. Invalid primitive mode."

if i call the following : glDrawArrays(GL_TRIANGLES,0,3); it shows a simple triangle but it is not filled with tessellation.

I'm working with OpenGL version 3.3.0, is there a reason for this behavior?

Sorry for my stupid beginner question.

Lehm2000
09-15-2014, 10:31 PM
I'm new myself, but I believe that tessellation was added in 4.0. https://www.opengl.org/sdk/docs/man3/xhtml/glDrawArrays.xml does not mention GL_PATCHES.

Aleksandar
09-16-2014, 04:36 AM
That is not a belief. A HW tessellation is not possible in OpenGL 3.3. You need to buy new hardware if you want to play with it.

stefano_brix
09-16-2014, 08:53 AM
Thanks everybody for the answers...i have a book that show all samples with opengl 4.0....and now i have to upgrade my hardware :-( ... Thanks again.