PDA

View Full Version : Fast Bezier splines (around 7000 curves)



WondeRu
06-17-2004, 01:35 AM
Hello!

I try
1)

gluBeginCurve(theNurb);
gluNurbsCurve(theNurb,
KnotsCount,
@curveKnots[0],
3,
@ctrlpoints[0, 0],
4,
GL_MAP1_VERTEX_3);
gluEndCurve(theNurb); or
2)


glMap1f(GL_MAP1_VERTEX_3, 0.0, 1.0, 3,PointsCount, @ctrlpoints[0, 0]);
glEnable(GL_MAP1_VERTEX_3);
glBegin(GL_LINE_STRIP);
for j := 0 to 30 do
glEvalCoord1f(j / 30.0);
glEnd;
glDisable(GL_MAP1_VERTEX_3);
But I get slow repainting of curves((((
These curves (around 7000) are in one display list.

How can I draw Bezier splines more fastly? Or Is possible to draw Bezier splines only with glVertex without glMap1f and gluNurbsCurve?

plasmonster
06-17-2004, 01:06 PM
from google:

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=28

the idea is to preprocess your patches into something hardware friendly, like triangle-strips.