-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
63 lines (47 loc) · 1.08 KB
/
main.cpp
File metadata and controls
63 lines (47 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
Computuational Geometry ACW
Zoe Nolan
20/4/1997
*/
/*
Main Program
*/
#include "spline.h"
#include <iostream.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
#include "aux.h"
TSpline *Displayer ;
void display()
{
glClear (GL_COLOR_BUFFER_BIT);
Displayer->Draw() ;
glFlush() ;
}
void myReshape(GLsizei w, GLsizei h)
{
Displayer->Resize(w,h) ;
}
main()
{
char Name[256] ;
// show start up message
cout<<"Computational Geometry"<<endl<<endl ;
cout<<"ACW - Cubic Splines"<<endl ;
cout<<endl<<endl<<"By Iain Nolan"<<endl<<endl ;
cout<<"Please Enter the Filename to load: " ;
cin>>Name ;
// load data
TSpline Spline(Name) ;
cout<<endl ;
Displayer=&Spline ;
// draw spline
auxInitDisplayMode (AUX_SINGLE | AUX_RGBA);
auxInitPosition (0, 0, 600, 600);
auxInitWindow ("Splines");
glClearColor (0.0, 0.0, 0.0, 1.0);
glShadeModel (GL_FLAT);
auxReshapeFunc (myReshape);
auxMainLoop(display);
}