framework2
32 строки · 1.2 Кб
1#include "ofApp.h"
2
3//========================================================================
4int main() {
5
6#ifdef TARGET_OPENGLES
7// here are the most commonly used iOS window settings.
8//------------------------------------------------------
9ofiOSWindowSettings settings;
10settings.enableRetina = true; // enables retina resolution if the device supports it.
11settings.enableDepth = true; // enables depth buffer for 3d drawing.
12settings.enableAntiAliasing = false; // enables anti-aliasing which smooths out graphics on the screen.
13settings.numOfAntiAliasingSamples = 0; // number of samples used for anti-aliasing.
14settings.enableHardwareOrientation = false; // enables native view orientation.
15settings.enableHardwareOrientationAnimation = false; // enables native orientation changes to be animated.
16settings.glesVersion = OFXIOS_RENDERER_ES2; // type of renderer to use, ES1, ES2, etc.
17
18ofCreateWindow(settings);
19
20return ofRunApp(new ofApp);
21
22#else
23ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context
24
25// this kicks off the running of my app
26// can be OF_WINDOW or OF_FULLSCREEN
27// pass in width and height too:
28ofRunApp( new ofApp() );
29#endif
30
31
32}
33