Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main.* in examples to have return values and updated syntax. #4677

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update main.* in examples to have return values and updated syntax.
  • Loading branch information
bakercp committed Dec 17, 2015
commit cadc3162eb8155b377489b51083a89fb1cd93d5b
8 changes: 6 additions & 2 deletions examples/3d/3DPrimitivesExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#include "ofAppRunner.h"
#include "ofApp.h"

//--------------------------------------------------------------
int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1280, 720, OF_WINDOW);
ofRunApp(new ofApp()); // start the app
return ofRunApp(std::make_shared<ofApp>());
}
19 changes: 8 additions & 11 deletions examples/3d/advanced3dExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){

ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());

int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1024, 768, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}
9 changes: 7 additions & 2 deletions examples/3d/cameraLensOffsetExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#include "ofAppRunner.h"
#include "ofApp.h"

int main() {
int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1280, 720, OF_WINDOW);
ofRunApp(new ofApp());
return ofRunApp(std::make_shared<ofApp>());
}
19 changes: 8 additions & 11 deletions examples/3d/cameraParentingExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){

ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());

int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1024, 768, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}
19 changes: 8 additions & 11 deletions examples/3d/cameraRibbonExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){

ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());

int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1024, 768, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}
19 changes: 8 additions & 11 deletions examples/3d/easyCamExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){

ofSetupOpenGL(640,480, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());

int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(640, 480, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}
19 changes: 8 additions & 11 deletions examples/3d/meshFromCamera/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){

ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());

int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1024, 768, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}
19 changes: 8 additions & 11 deletions examples/3d/modelNoiseExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){

ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());

int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1024, 768, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}
19 changes: 8 additions & 11 deletions examples/3d/normalsExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){

ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());

int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1024, 768, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}
19 changes: 8 additions & 11 deletions examples/3d/ofBoxExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){

ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());

int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1024, 768, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}
16 changes: 9 additions & 7 deletions examples/3d/ofNodeExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){
ofGLFWWindowSettings settings;
settings.setGLVersion(3, 2);
int main(){
ofGLWindowSettings settings;
settings.setGLVersion(3,2);
settings.width = 1280;
settings.height = 720;
ofCreateWindow(settings);

ofRunApp(new ofApp());
auto window = ofCreateWindow(settings);
auto app = std::make_shared<ofApp>();

ofRunApp(window, app);

return ofRunMainLoop();
}
19 changes: 8 additions & 11 deletions examples/3d/orientationExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){

ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());

int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1024, 768, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}
19 changes: 8 additions & 11 deletions examples/3d/pointCloudExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){

ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());

int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1024, 768, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}
19 changes: 8 additions & 11 deletions examples/3d/pointPickerExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){

ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());

int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1024, 768, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}
19 changes: 8 additions & 11 deletions examples/3d/quaternionArcballExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){

ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());

int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1024, 768, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}
19 changes: 8 additions & 11 deletions examples/3d/quaternionLatLongExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

//========================================================================
int main( ){

ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());

int main(){
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1024, 768, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}
16 changes: 7 additions & 9 deletions examples/android/androidAccelerometerExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
#include "ofMain.h"
#include "ofAppRunner.h"
#include "ofApp.h"

int main(){
ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context

// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp() );
return 0;
// ofSetupOpenGL sets up a default OpenGL window for ofApp. The initial
// window width, height and fullscreen status (OF_WINDOW or OF_FULLSCREEN)
// can be set here. Window shape and fullscreen status can changed elsewhere
// with ofSetWindowShape(x, y) and ofSetFullscreen(fullscreen) respectively.
ofSetupOpenGL(1024, 768, OF_WINDOW);
return ofRunApp(std::make_shared<ofApp>());
}


#ifdef TARGET_ANDROID
#include <jni.h>

//========================================================================
extern "C"{
void Java_cc_openframeworks_OFAndroid_init( JNIEnv* env, jobject thiz ){
main();
Expand Down
Loading