Merge "Fix RS graphics samples."

This commit is contained in:
Stephen Hines
2011-05-03 15:11:33 -07:00
committed by Android (Google) Code Review
4 changed files with 8 additions and 10 deletions

View File

@@ -56,12 +56,12 @@ int root() {
Ball_t *bout; Ball_t *bout;
if (frame & 1) { if (frame & 1) {
rsSetObject(&bc.ain, rsGetAllocation(balls2)); bc.ain = rsGetAllocation(balls2);
rsSetObject(&bc.aout, rsGetAllocation(balls1)); bc.aout = rsGetAllocation(balls1);
bout = balls2; bout = balls2;
} else { } else {
rsSetObject(&bc.ain, rsGetAllocation(balls1)); bc.ain = rsGetAllocation(balls1);
rsSetObject(&bc.aout, rsGetAllocation(balls2)); bc.aout = rsGetAllocation(balls2);
bout = balls1; bout = balls1;
} }
@@ -78,8 +78,6 @@ int root() {
frame++; frame++;
rsgBindProgramFragment(gPFPoints); rsgBindProgramFragment(gPFPoints);
rsgDrawMesh(partMesh); rsgDrawMesh(partMesh);
rsClearObject(&bc.ain);
rsClearObject(&bc.aout);
return 1; return 1;
} }

View File

@@ -31,7 +31,7 @@ void init() {
gTouchY = 50.0f; gTouchY = 50.0f;
} }
int root(int launchID) { int root(void) {
// Clear the background color // Clear the background color
rsgClearColor(0.0f, 0.0f, 0.0f, 0.0f); rsgClearColor(0.0f, 0.0f, 0.0f, 0.0f);

View File

@@ -34,7 +34,7 @@ void init() {
int textPos = 0; int textPos = 0;
int root(int launchID) { int root(void) {
rsgClearColor(0.0f, 0.0f, 0.0f, 0.0f); rsgClearColor(0.0f, 0.0f, 0.0f, 0.0f);
@@ -45,7 +45,7 @@ int root(int launchID) {
rsgBindFont(gItalic); rsgBindFont(gItalic);
rs_allocation listAlloc; rs_allocation listAlloc;
rsSetObject(&listAlloc, rsGetAllocation(gList)); listAlloc = rsGetAllocation(gList);
int allocSize = rsAllocationGetDimX(listAlloc); int allocSize = rsAllocationGetDimX(listAlloc);
int width = rsgGetWidth(); int width = rsgGetWidth();

View File

@@ -633,7 +633,7 @@ static void displayAnisoSample() {
} }
} }
int root(int launchID) { int root(void) {
gDt = rsGetDt(); gDt = rsGetDt();