-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
41 lines (28 loc) · 778 Bytes
/
main.cpp
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
#include <stdio.h>
#include <GL/gl.h>
#include <GL/glut.h>
#include "globals_lib.h"
#include "graphics_lib.h"
using namespace std;
//Initialize the variables from globals_lib.h.
int numberOfIntersections = 0;
//Sets the size of the screen.
int w = 500, h = 500;
bool firstClick = false;
LineSegment seg;
vector<LineSegment> segmentVector;
vector<SweepLineSeg> sweepVector;
vector<Point> intersections;
int main(int argc, char** argv){
//Basic functions for an OpenGL project.
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
glutInitWindowSize(w, h);
glutCreateWindow("Trabalho 1 - Thais Luca");
init();
glutReshapeFunc(reshape);
glutMouseFunc(mouseFunc);
glutPassiveMotionFunc(mouseDrag);
glutMainLoop();
return 0;
}