Add command line params for disabling keys
author |
Henrik Ekeus <hekeus@eecs.qmul.ac.uk> |
date |
Tue, 24 Jan 2012 13:48:54 +0000 |
parents |
2db9be889344 |
children |
8c4903923021 |
rev |
line source |
hekeus@0
|
1 #include "ofMain.h"
|
hekeus@0
|
2 #include "melodyTriangle.h"
|
hekeus@0
|
3 #include "ofAppGlutWindow.h"
|
hekeus@0
|
4
|
hekeus@0
|
5 #define HOST "localhost"
|
hekeus@0
|
6 #define PORT 7770
|
hekeus@0
|
7 #define NUMVOICES 3
|
hekeus@0
|
8
|
hekeus@0
|
9 //========================================================================
|
hekeus@0
|
10 int main(int argc, const char **argv ){
|
hekeus@0
|
11
|
hekeus@0
|
12 ofAppGlutWindow window;
|
hekeus@0
|
13
|
hekeus@0
|
14 if (argc>4 ? atoi(argv[4]) : false){
|
hekeus@0
|
15 ofSetupOpenGL(&window, 1280,800, OF_FULLSCREEN); // <-------- setup the GL context
|
hekeus@0
|
16 }else{
|
hekeus@0
|
17 ofSetupOpenGL(&window, 800,600, OF_WINDOW);
|
hekeus@0
|
18 }
|
hekeus@0
|
19 // this kicks off the running of my app
|
hekeus@0
|
20 // can be OF_WINDOW or OF_FULLSCREEN
|
hekeus@0
|
21 // pass in width and height too:
|
hekeus@0
|
22 ofRunApp( new melodyTriangle(argc>1 ? argv[1] : HOST,
|
hekeus@0
|
23 argc>2 ? atoi(argv[2]) : PORT,
|
hekeus@1
|
24 argc>3 ? atoi(argv[3]) : NUMVOICES,
|
hekeus@1
|
25 argc>5 ? atoi(argv[5]) : true));
|
hekeus@0
|
26
|
hekeus@0
|
27 }
|