View Full Version : Loading Control Points
Swiftless
07-20-2005, 08:02 PM
Hi,
I have been looking into bezier curves and all the tutorials I find have the control points already allocated at the top of the program. I was wondering, how could I load these from a file?
Thanks
Ehsan Kamrani
07-20-2005, 09:14 PM
Some lessons of NeHe have used from a function to load the data from a text file. See lesson 10 or 25 of NeHe. you write your control points into the text file and then read the values of the text file.
-Ehsan-
Swiftless
07-20-2005, 10:46 PM
I am able to load the points now, but I cannot load them into mp Bezier map, the code says that the last parameter of glMap2f to a float or integer, it has to be a const.
ZbuffeR
07-21-2005, 12:15 AM
void glMap2f(GLenum target,
GLdouble u1,
GLdouble u2,
GLint ustride,
GLint uorder,
GLdouble v1,
GLdouble v2,
GLint vstride,
GLint vorder,
const GLfloat *points)If I am not mistaken the last parameter must just be an array of (or pointer to) GLfloat, the const meaning that glMap2f itself won't modify the data.
So don't worry.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.