diff options
| author | 2009-09-24 12:33:45 -0700 | |
|---|---|---|
| committer | 2009-09-24 12:33:45 -0700 | |
| commit | b6f2b131c42e5148b07c7cfe22b8bd5bc5b4ad4b (patch) | |
| tree | 526051b48705eb45cbccd6be16be9aaff75f255b /libs/rs/rsProgramVertex.cpp | |
| parent | 6b9dec00afec359f091ed353f371f08ff150278a (diff) | |
Removed last bits of predefined element types from native code. Predefined types are now constructed at the java layer from standard building blocks.
Diffstat (limited to 'libs/rs/rsProgramVertex.cpp')
| -rw-r--r-- | libs/rs/rsProgramVertex.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp index a07e166bb74a..dda56d79db35 100644 --- a/libs/rs/rsProgramVertex.cpp +++ b/libs/rs/rsProgramVertex.cpp @@ -133,9 +133,16 @@ ProgramVertexState::~ProgramVertexState() void ProgramVertexState::init(Context *rsc, int32_t w, int32_t h) { + rsi_ElementBegin(rsc); + rsi_ElementAdd(rsc, RS_KIND_USER, RS_TYPE_FLOAT, false, 32, NULL); + RsElement e = rsi_ElementCreate(rsc); + + rsi_TypeBegin(rsc, e); + rsi_TypeAdd(rsc, RS_DIMENSION_X, 48); + mAllocType = rsi_TypeCreate(rsc); + ProgramVertex *pv = new ProgramVertex(NULL, NULL); - Allocation *alloc = (Allocation *) - rsi_AllocationCreatePredefSized(rsc, RS_ELEMENT_USER_FLOAT, 48); + Allocation *alloc = (Allocation *)rsi_AllocationCreateTyped(rsc, mAllocType); mDefaultAlloc.set(alloc); mDefault.set(pv); |