diff options
| author | Jason Sams <rjsams@android.com> | 2010-06-25 12:45:41 -0700 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2010-06-25 12:45:41 -0700 |
| commit | eeeaccc89971268a0cc63ac0ae0868b5c003c9a9 (patch) | |
| tree | c1325893e4dc15acb4db01e21c1b0d7589150a34 /libs/rs/rsVertexArray.h | |
| parent | 6495128049975815e46081874b8ede8efddad2f4 (diff) | |
| download | frameworks_base-eeeaccc89971268a0cc63ac0ae0868b5c003c9a9.zip frameworks_base-eeeaccc89971268a0cc63ac0ae0868b5c003c9a9.tar.gz frameworks_base-eeeaccc89971268a0cc63ac0ae0868b5c003c9a9.tar.bz2 | |
Add support for non-VBO drawing in Meshes.
Change-Id: Ic4dd88cbe591091ebe740babe30213c15ad60cb3
Diffstat (limited to 'libs/rs/rsVertexArray.h')
| -rw-r--r-- | libs/rs/rsVertexArray.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libs/rs/rsVertexArray.h b/libs/rs/rsVertexArray.h index e5b51d7..7c609b2 100644 --- a/libs/rs/rsVertexArray.h +++ b/libs/rs/rsVertexArray.h @@ -37,6 +37,7 @@ public: class Attrib { public: uint32_t buffer; + const uint8_t * ptr; uint32_t offset; uint32_t type; uint32_t size; @@ -51,7 +52,15 @@ public: void clearAll(); - void setActiveBuffer(uint32_t id) {mActiveBuffer = id;} + void setActiveBuffer(uint32_t id) { + mActiveBuffer = id; + mActivePointer = NULL; + } + void setActiveBuffer(const void *ptr) { + mActiveBuffer = 0; + mActivePointer = (const uint8_t *)ptr; + } + void add(const Attrib &, uint32_t stride); //void addLegacy(uint32_t type, uint32_t size, uint32_t stride, bool normalized, uint32_t offset); void add(uint32_t type, uint32_t size, uint32_t stride, bool normalized, uint32_t offset, const char *name); @@ -63,6 +72,7 @@ public: protected: void clear(uint32_t index); uint32_t mActiveBuffer; + const uint8_t * mActivePointer; uint32_t mCount; Attrib mAttribs[RS_MAX_ATTRIBS]; |
