-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmain.cpp
More file actions
41 lines (30 loc) · 698 Bytes
/
Copy pathmain.cpp
File metadata and controls
41 lines (30 loc) · 698 Bytes
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
// by dff180
#include <iostream>
#include <string>
#include <stdlib.h>
#include "MyGLWindow.h"
#include "bcm_host.h"
int main(int argc, char ** argv)
{
atexit( bcm_host_deinit);
// Parse command line
std::string fragmentShader;
std::string textureName;
if (argc >= 2)
fragmentShader = argv[1];
if (argc >= 3)
textureName = argv[2];
// Init graphics
std::cout << "bcm_host_init()" << std::endl;
bcm_host_init();
std::cout << "bcm_host_init() : Done\n";
EGLconfig *config = new EGLconfig();
config->setRGBA(8,8,8,8);
config->setDepth(16);
MyGLWindow win(config, fragmentShader, textureName);
while(1)
{
win.paintGL();
sleep(0.01);
}
}