From 369bd8af52c872c458923e6d7f45762f8c62a927 Mon Sep 17 00:00:00 2001 From: Cailean Finn Date: Sun, 4 Feb 2024 17:08:06 +0000 Subject: [PATCH] first --- .gitignore | 8 +++++ hello-world/src/main.cpp | 17 ++++++++++ hello-world/src/ofApp.cpp | 71 +++++++++++++++++++++++++++++++++++++++ hello-world/src/ofApp.h | 24 +++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 .gitignore create mode 100644 hello-world/src/main.cpp create mode 100644 hello-world/src/ofApp.cpp create mode 100644 hello-world/src/ofApp.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0f57499 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +/*/bin/ +/*/.vs/ +/*/!src/* +*.sln +*.make +*.vcxproj +*.vcxproj.* +*.rc diff --git a/hello-world/src/main.cpp b/hello-world/src/main.cpp new file mode 100644 index 0000000..b14f12f --- /dev/null +++ b/hello-world/src/main.cpp @@ -0,0 +1,17 @@ +#include "ofMain.h" +#include "ofApp.h" + +//======================================================================== +int main( ){ + + //Use ofGLFWWindowSettings for more options like multi-monitor fullscreen + ofGLWindowSettings settings; + settings.setSize(1024, 768); + settings.windowMode = OF_WINDOW; //can also be OF_FULLSCREEN + + auto window = ofCreateWindow(settings); + + ofRunApp(window, make_shared()); + ofRunMainLoop(); + +} diff --git a/hello-world/src/ofApp.cpp b/hello-world/src/ofApp.cpp new file mode 100644 index 0000000..0d3236e --- /dev/null +++ b/hello-world/src/ofApp.cpp @@ -0,0 +1,71 @@ +#include "ofApp.h" + +//-------------------------------------------------------------- +void ofApp::setup(){ + +} + +//-------------------------------------------------------------- +void ofApp::update(){ + +} + +//-------------------------------------------------------------- +void ofApp::draw(){ + +} + +//-------------------------------------------------------------- +void ofApp::keyPressed(int key){ + +} + +//-------------------------------------------------------------- +void ofApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseMoved(int x, int y ){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseDragged(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mousePressed(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseReleased(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseEntered(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseExited(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::windowResized(int w, int h){ + +} + +//-------------------------------------------------------------- +void ofApp::gotMessage(ofMessage msg){ + +} + +//-------------------------------------------------------------- +void ofApp::dragEvent(ofDragInfo dragInfo){ + +} diff --git a/hello-world/src/ofApp.h b/hello-world/src/ofApp.h new file mode 100644 index 0000000..a9a1eea --- /dev/null +++ b/hello-world/src/ofApp.h @@ -0,0 +1,24 @@ +#pragma once + +#include "ofMain.h" + +class ofApp : public ofBaseApp{ + + public: + void setup(); + void update(); + void draw(); + + void keyPressed(int key); + void keyReleased(int key); + void mouseMoved(int x, int y ); + void mouseDragged(int x, int y, int button); + void mousePressed(int x, int y, int button); + void mouseReleased(int x, int y, int button); + void mouseEntered(int x, int y); + void mouseExited(int x, int y); + void windowResized(int w, int h); + void dragEvent(ofDragInfo dragInfo); + void gotMessage(ofMessage msg); + +};