Mercurial > hg > screen-ui
annotate main.cpp @ 0:2db9be889344
Initial Commit
author | Henrik Ekeus <hekeus@eecs.qmul.ac.uk> |
---|---|
date | Mon, 23 Jan 2012 16:46:37 +0000 |
parents | |
children | 3b6ab3b28808 |
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@0 | 24 argc>3 ? atoi(argv[3]) : NUMVOICES)); |
hekeus@0 | 25 |
hekeus@0 | 26 } |