Molecule Viewer
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Enumerations
Pages
source
Program.cpp
1
2
#include <iostream>
3
#include <fstream>
4
#include <string>
5
6
#include "ConfigFile.h"
7
#include "AppMain.hpp"
8
9
10
11
//**************************************************//
12
// START: Main entry point
13
//**************************************************//
14
15
16
17
void
main2 (
void
) {
18
19
20
InitMemoryTracker();
//finding memory leaks
21
22
23
//**************************************************//
24
// Read Config File
25
//**************************************************//
26
ConfigFile config(
"../bin/config.txt"
);
27
28
//get window resolution (default 1000*1000)
29
int
width=1000;
30
SetWindowWidth(width);
31
32
int
height=1000;
33
SetWindowHeight(height);
34
35
int
occlusionQuality=1 ;
36
SetOcclusionQuality(occlusionQuality);
37
38
39
40
AppMain
* app =
new
AppMain
();
41
42
43
//init
44
//if (app->CreateGLContext()) {
45
app->GenerateShaders();
46
app->
PrepareScene
();
47
48
49
//pressed keys will not be released until checked again
50
//glfwEnable(GLFW_STICKY_KEYS);
51
52
//render and update
53
bool
running =
true
;
54
55
56
while
(running) {
57
58
//set time difference to last frame
59
// setTimeDiff(glfwGetTime());
60
// glfwSetTime(0);
61
62
// app->UpdateScene();
63
app->
DrawScene
();
64
65
// if (glfwGetKey(GLFW_KEY_ESC))
66
// running = false;
67
}
68
69
70
// } else {
71
// cerr << app->GetErrorMessage();
72
// }
73
74
75
76
//cleanup
77
//TwTerminate(); //this move
78
79
delete
app;
80
}
Generated on Thu Jun 6 2013 18:42:59 for Molecule Viewer by
1.8.3.1