diff options
| author | Alex Sakhartchouk <alexst@google.com> | 2010-11-08 15:10:52 -0800 |
|---|---|---|
| committer | Alex Sakhartchouk <alexst@google.com> | 2010-11-08 15:10:52 -0800 |
| commit | 9d71e2180062931416092f26276a07e55b318f62 (patch) | |
| tree | 4e649a7ff122348fc2ed2961b3c280a989327242 /libs/rs/rsFont.cpp | |
| parent | 5b59e02eb542f016866985945859b033e94f9f0b (diff) | |
| download | frameworks_base-9d71e2180062931416092f26276a07e55b318f62.zip frameworks_base-9d71e2180062931416092f26276a07e55b318f62.tar.gz frameworks_base-9d71e2180062931416092f26276a07e55b318f62.tar.bz2 | |
Moving attrib creation to Mesh. Adding arrays as shader inputs.
Removing fixed size arrays.
Change-Id: I0213e403a2f1283dd43f21bea770aeb059561903
Diffstat (limited to 'libs/rs/rsFont.cpp')
| -rw-r--r-- | libs/rs/rsFont.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/rs/rsFont.cpp b/libs/rs/rsFont.cpp index 9e76215..66f455c 100644 --- a/libs/rs/rsFont.cpp +++ b/libs/rs/rsFont.cpp @@ -663,9 +663,10 @@ void FontState::issueDrawCommand() { float *vtx = (float*)mVertexArray->getPtr(); float *tex = vtx + 3; - VertexArray va; - va.add(GL_FLOAT, 3, 20, false, (uint32_t)vtx, "ATTRIB_position"); - va.add(GL_FLOAT, 2, 20, false, (uint32_t)tex, "ATTRIB_texture0"); + VertexArray::Attrib attribs[2]; + attribs[0].set(GL_FLOAT, 3, 20, false, (uint32_t)vtx, "ATTRIB_position"); + attribs[1].set(GL_FLOAT, 2, 20, false, (uint32_t)tex, "ATTRIB_texture0"); + VertexArray va(attribs, 2); va.setupGL2(mRSC, &mRSC->mStateVertexArray, &mRSC->mShaderCache); mIndexBuffer->uploadCheck(mRSC); |
