Skip to content

Commit 3b6af85

Browse files
committed
Android Example Fixes
1 parent 3046dfb commit 3b6af85

File tree

3 files changed

+19
-24
lines changed

3 files changed

+19
-24
lines changed

examples/android/androidEmptyExample/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ std::shared_ptr<ofAppBaseWindow> baseWindow;
1313
int main(int argc, char **argv) {
1414
baseWindow = std::make_shared<ofAppAndroidWindow>();
1515
ofxAndroidWindowSettings settings;
16-
settings.glesVersion = 2;
16+
settings.glesVersion = 1;
1717
settings.setSize(1920, 1080);
1818
settings.windowMode = OF_WINDOW;
1919
settings.preserveContextOnPause = true;

examples/android/androidFontExample/src/ofApp.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
//--------------------------------------------------------------
44
void ofApp::setup(){
5-
font.load("frabk.ttf",14);
5+
font.load("frabk.ttf",58);
66
ofBackground(255,255,255);
77
ofSetColor(0,0,0);
88
}
@@ -15,18 +15,18 @@ void ofApp::update(){
1515
//--------------------------------------------------------------
1616
void ofApp::draw(){
1717

18-
font.drawString("hello world!!",20,20);
18+
font.drawString("hello world!!",128,128);
1919
//ofDrawBitmapString(ofToString(ofGetFrameRate()),20,30);
2020
}
2121

2222
//--------------------------------------------------------------
23-
void ofApp::keyPressed (int key){
24-
23+
void ofApp::keyPressed (int key){
24+
2525
}
2626

2727
//--------------------------------------------------------------
28-
void ofApp::keyReleased(int key){
29-
28+
void ofApp::keyReleased(int key){
29+
3030
}
3131

3232
//--------------------------------------------------------------

examples/android/androidGuiExample/src/ofApp.cpp

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#include "ofApp.h"
22

3-
3+
44
//--------------------------------------------------------------
55
void ofApp::setup(){
66
ofSetVerticalSync(true);
7-
7+
88
// we add this listener before setting up so the initial circle resolution is correct
99
circleResolution.addListener(this, &ofApp::circleResolutionChanged);
1010
ringButton.addListener(this,&ofApp::ringButtonPressed);
@@ -24,7 +24,7 @@ void ofApp::setup(){
2424
gui.add(twoCircles.setup("twoCircles"));
2525
gui.add(ringButton.setup("ring"));
2626
gui.add(screenSize.set("screenSize", ofToString(ofGetWidth()) + "x" + ofToString(ofGetHeight())));
27-
27+
2828
bHide = true;
2929

3030
ring.load("ring.wav");
@@ -52,7 +52,7 @@ void ofApp::update(){
5252
//--------------------------------------------------------------
5353
void ofApp::draw(){
5454
ofBackgroundGradient(ofColor::white, ofColor::gray);
55-
55+
5656
if( filled ){
5757
ofFill();
5858
}else{
@@ -66,7 +66,7 @@ void ofApp::draw(){
6666
}else{
6767
ofCircle(center->x, center->y, radius );
6868
}
69-
69+
7070
if( bHide ){
7171
gui.draw();
7272
}
@@ -90,12 +90,12 @@ void ofApp::keyPressed(int key){
9090

9191
//--------------------------------------------------------------
9292
void ofApp::keyReleased(int key){
93-
93+
9494
}
9595

9696
//--------------------------------------------------------------
9797
void ofApp::mouseMoved(int x, int y ){
98-
98+
9999
}
100100

101101
//--------------------------------------------------------------
@@ -104,12 +104,12 @@ void ofApp::mouseDragged(int x, int y, int button){
104104

105105
//--------------------------------------------------------------
106106
void ofApp::mousePressed(int x, int y, int button){
107-
107+
108108
}
109109

110110
//--------------------------------------------------------------
111111
void ofApp::mouseReleased(int x, int y, int button){
112-
112+
113113
}
114114

115115
//--------------------------------------------------------------
@@ -129,12 +129,12 @@ void ofApp::windowResized(int w, int h){
129129

130130
//--------------------------------------------------------------
131131
void ofApp::gotMessage(ofMessage msg){
132-
132+
133133
}
134134

135135
//--------------------------------------------------------------
136-
void ofApp::dragEvent(ofDragInfo dragInfo){
137-
136+
void ofApp::dragEvent(ofDragInfo dragInfo){
137+
138138
}
139139

140140
//--------------------------------------------------------------
@@ -152,8 +152,3 @@ void ofApp::deviceRefreshRateChangedEvent(int &refreshRate) {
152152
//--------------------------------------------------------------
153153
void ofApp::deviceHighestRefreshRateChangedEvent(int &refreshRate) {
154154
}
155-
156-
//--------------------------------------------------------------
157-
void ofApp::exit(){
158-
159-
}

0 commit comments

Comments
 (0)