Tessellation -> very begginner question

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 :


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.

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.

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.

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 :frowning: … Thanks again.