using vertex arrays while using tessallation

hi all,
i’m using tessallation feature for tesslating my polygons but due to huge amount of data it is giving me slow performance. currently i’m using immediate mode. can any one tell me how to use the vertex array while tessallating because i’m not getting any clue how to access the vertex data while using tessaltion feature.

here are my call backs fucnc:

gluTessCallback(pTess, GLU_TESS_BEGIN, (void (__stdcall*)())glBegin);

	// Just call glEnd at end of triangle batch
	gluTessCallback(pTess, GLU_TESS_END, (void (__stdcall*)())glEnd);

	// Just call glVertex3dv for each  vertex
	gluTessCallback(pTess, GLU_TESS_VERTEX, (void (__stdcall*)())glVertex3dv );

	// Register error callback
	gluTessCallback(pTess, GLU_TESS_ERROR, (void (__stdcall *)(void))tessError);

	gluTessProperty(pTess, GLU_TESS_TOLERANCE, 0.9F);

	gluTessCallback(pTess, GLU_TESS_COMBINE, (void (__stdcall *) ())combineCallback);

gluTessBeginPolygon(pTess, NULL);

	// Gegin the one and only contour

	// Feed in the list of vertices
	for(int nVertIndex = 0; nVertIndex < nIndex; nVertIndex++)
		gluTessVertex(pTess, Coords[nVertIndex], Coords[nVertIndex]); // Can't be NULL

	// Close contour and polygon


Coords are nothing just 1x3 array pointer to point x y z values.

pls help me in this regard. Thank you

Everything in GLU runs on the CPU. And tessellation was created before vertex arrays, and long before buffer objects.

In short, don’t use tessellation if you actually care about performance. Do the tessellation yourself, either in optimized CPU routines or with shaders designed for that purpose.

thanks for the reply…
can u tell me some alternate ways to do tessallation…

Under OpenGL you can use geometry shaders (this is probably the best and only way on most graphics cards … your card also must support geometry shaders), but this is NOT definitely the fast way to do it … sample how to do it is here

On some AMD graphics cards (F.e. HD 2900xt and others) you have extension GL_AMD_vertex_shader_tessellation (or experimental GL_AMDX_vertex_shader_tessellation), this way you perform hardware tessellation (using AMD tessellator) - this way is much faster than using geometry shaders.

Actually, all currently supported AMD cards support the AMD_vertex_shader_tessellator extension (R600+ GPUs, basically anything that you can download a new Catalyst for). There’s a whitepaper and some example code for using it here: under the ‘OpenGL Tessellation Samples’ heading. If you need the application to have access to the tessellated vertices, you can use transform feedback to record the output of the tessellator and read it back from the buffer after the draw.