View Full Version : Loading Control Points
07-20-2005, 08:02 PM
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?
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.
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.
07-21-2005, 12:15 AM
void glMap2f(GLenum target,
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.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.