-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
45 lines (39 loc) · 1019 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
42
43
44
45
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "CGLUTApplication.h"
#include "CGLUTInterface.h"
int main(int argc, char **argv)
{
int car;
int skyDome;
char* cars[7] = {
"models/cars/corvette.icc",
"models/cars/california.icc",
"models/cars/911.icc",
"models/cars/carreraGT.icc",
"models/cars/mustang.icc",
"models/cars/SL500.icc",
"models/cars/sls_amg.icc",
};
char* skyDomes[4] = {
"images/sky1.jpg",
"images/sky2.jpg",
"images/sky3.jpg",
"images/sky4.jpg"
};
srand((unsigned int) time(0));
SGLUTParameters param;
param.FSAA = true;
param.WindowTitle = "IonCon 0.1";
printf("Enter the number of desired sky dome (0-3): ");
scanf("%d", &skyDome);
param.SkyDome = skyDomes[skyDome%4];
printf("\nEnter the number of desired car:\n0: Corvette, 1: California, 2: 911,\n3: Carrera GT, 4: Mustang, 5: SL500, 6: SLS AMG;\n");
scanf("%d", &car);
param.Car = cars[car%7];
CGLUTApplication app(param);
CGLUTInterface::connect(&app);
glutMainLoop();
return 1;
}