add example with profiler (for compile_commands)
This commit is contained in:
parent
7ef6d13c93
commit
9e215008d3
7 changed files with 6498 additions and 0 deletions
4
example-profiler/addons.make
Normal file
4
example-profiler/addons.make
Normal file
|
@ -0,0 +1,4 @@
|
|||
ofxMsdfgen
|
||||
ofxGPUFont
|
||||
ofxVariableLab
|
||||
ofxProfiler
|
14
example-profiler/clean.sh
Executable file
14
example-profiler/clean.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
PREVIOUS_DIR=$(pwd)
|
||||
|
||||
cd $DIR
|
||||
|
||||
emmake make clean && make clean && rm -rf obj && rm -rf ../../obj
|
||||
rm -rf ../../../libs/openFrameworksCompiled/lib/linux64/obj
|
||||
rm -rf ../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a
|
||||
rm -rf ../../../libs/openFrameworksCompiled/lib/emscripten/obj
|
||||
rm -rf ../../../libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.bc
|
||||
|
||||
cd $PREVIOUS_DIR
|
6338
example-profiler/compile_commands.linux64.json
Normal file
6338
example-profiler/compile_commands.linux64.json
Normal file
File diff suppressed because it is too large
Load diff
25
example-profiler/generate_compile_commands.sh
Executable file
25
example-profiler/generate_compile_commands.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
PREVIOUS_DIR="$(pwd)"
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
cd $DIR
|
||||
|
||||
# clean
|
||||
make clean && rm -rf obj && rm -rf ../../../addons/obj
|
||||
rm -rf ../../../libs/openFrameworksCompiled/lib/linux64/obj
|
||||
rm -rf ../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a
|
||||
|
||||
# generate
|
||||
bear -- make -j$(nproc)
|
||||
# rename
|
||||
mv compile_commands.json compile_commands.linux64.json
|
||||
|
||||
# clean
|
||||
make clean && rm -rf obj && rm -rf ../../../addons/obj
|
||||
rm -rf ../../../libs/openFrameworksCompiled/lib/emscripten/obj
|
||||
rm -rf ../../../libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.bc
|
||||
|
||||
bear -- emmake make -j$(nproc)
|
||||
|
||||
cd $PREVIOUS_DIR
|
21
example-profiler/src/main.cpp
Normal file
21
example-profiler/src/main.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#include "ofMain.h"
|
||||
#include "ofApp.h"
|
||||
|
||||
//========================================================================
|
||||
int main(){
|
||||
#ifdef OF_TARGET_OPENGLES
|
||||
ofGLESWindowSettings settings;
|
||||
//settings.setSize(1920, 1080);
|
||||
settings.glesVersion = 2;
|
||||
#else
|
||||
ofGLWindowSettings settings;
|
||||
settings.setSize(1920, 1080);
|
||||
settings.setGLVersion(3, 2);
|
||||
#endif
|
||||
ofCreateWindow(settings);
|
||||
|
||||
// this kicks off the running of my app
|
||||
// can be OF_WINDOW or OF_FULLSCREEN
|
||||
// pass in width and height too:
|
||||
ofRunApp(new ofApp());
|
||||
}
|
71
example-profiler/src/ofApp.cpp
Normal file
71
example-profiler/src/ofApp.cpp
Normal file
|
@ -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){
|
||||
|
||||
}
|
25
example-profiler/src/ofApp.h
Normal file
25
example-profiler/src/ofApp.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
#pragma once
|
||||
|
||||
#include "ofMain.h"
|
||||
#include "ofxVariableLab.h"
|
||||
#include "ofxProfiler.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);
|
||||
};
|
Loading…
Reference in a new issue