Skip to content

Commit

Permalink
android polygon example compatibility with gles2
Browse files Browse the repository at this point in the history
  • Loading branch information
arturoc committed Nov 12, 2012
1 parent a5922f3 commit ee7ae14
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions examples/android/androidPolygonExample/src/testApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

//--------------------------------------------------------------
void testApp::setup(){

// register touch events
ofRegisterTouchEvents(this);

//ofSetOrientation(OF_ORIENTATION_90_RIGHT);

Expand Down Expand Up @@ -153,8 +150,8 @@ void testApp::draw(){
//
// use sin cos and time to make some spirally shape
//
glPushMatrix();
glTranslatef(100,300,0);
ofPushMatrix();
ofTranslate(100,300,0);
ofSetHexColor(0xff2220);
ofFill();
ofSetPolyMode(OF_POLY_WINDING_ODD);
Expand All @@ -170,7 +167,7 @@ void testApp::draw(){
radius += radiusAdder;
}
ofEndShape(OF_CLOSE);
glPopMatrix();
ofPopMatrix();
//-------------------------------------

//------(f)--------------------------------------
Expand Down Expand Up @@ -316,7 +313,7 @@ void testApp::draw(){
ofNoFill();


glPushMatrix();
ofPushMatrix();

ofSetPolyMode(OF_POLY_WINDING_ODD);

Expand All @@ -339,7 +336,7 @@ void testApp::draw(){

ofEndShape(true);

glTranslatef(100,0,0);
ofTranslate(100,0,0);

ofSetPolyMode(OF_POLY_WINDING_NONZERO);
ofBeginShape();
Expand All @@ -360,7 +357,7 @@ void testApp::draw(){

ofEndShape(true);

glTranslatef(100,0,0);
ofTranslate(100,0,0);
ofSetPolyMode(OF_POLY_WINDING_ABS_GEQ_TWO);
ofBeginShape();
ofVertex(300,500);
Expand All @@ -379,7 +376,7 @@ void testApp::draw(){

ofEndShape(true);

glPopMatrix();
ofPopMatrix();
//-------------------------------------


Expand Down

0 comments on commit ee7ae14

Please sign in to comment.