diff options
| author | 2009-07-06 14:16:55 -0700 | |
|---|---|---|
| committer | 2009-07-06 14:16:55 -0700 | |
| commit | 03a9a3449af3e0e79e9bbcd87f8057189ab9e151 (patch) | |
| tree | 66f68465156e6eef8480161d87e87376f5bea813 /libs/rs/rsScriptC.cpp | |
| parent | f780d32fc2081fbf10a5bec19a654465361fc538 (diff) | |
| parent | 78d0fdfad1437b2382e8803fa396fbe0f38a214f (diff) | |
Merge commit 'goog/master' into merge_master
Diffstat (limited to 'libs/rs/rsScriptC.cpp')
| -rw-r--r-- | libs/rs/rsScriptC.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index 9c99e2b4f8c2..0ec6bafe9730 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -324,8 +324,8 @@ extern "C" void drawQuad(int32_t x1, int32_t y1, int32_t z1, //LOGE("0x%08x, 0x%08x, 0x%08x", x3, y3, z3); //LOGE("0x%08x, 0x%08x, 0x%08x", x4, y4, z4); - int32_t vtx[] = {x1,y1,z1, x4,y4,z4, x3,y3,z3, x2,y2,z2}; - static const int32_t tex[] = {0,0, 0,0x10000, 0x10000,0, 0x10000,0x10000}; + int32_t vtx[] = {x1,y1,z1, x2,y2,z2, x3,y3,z3, x4,y4,z4}; + static const int32_t tex[] = {0,0, 0,0x10000, 0x10000,0x10000, 0x10000,0}; rsc->setupCheck(); @@ -334,12 +334,19 @@ extern "C" void drawQuad(int32_t x1, int32_t y1, int32_t z1, //glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, tm->mBufferObjects[1]); glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(3, GL_FIXED, 0, vtx); + + glClientActiveTexture(GL_TEXTURE0); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(2, GL_FIXED, 0, tex); + glClientActiveTexture(GL_TEXTURE1); glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(2, GL_FIXED, 0, tex); + glClientActiveTexture(GL_TEXTURE0); + glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_COLOR_ARRAY); - glVertexPointer(3, GL_FIXED, 0, vtx); - glTexCoordPointer(2, GL_FIXED, 0, tex); //glColorPointer(4, GL_UNSIGNED_BYTE, 12, ptr); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); |