Jason Sams | f70b0fc8 | 2012-02-22 15:22:41 -0800 | [diff] [blame] | 1 | |
| 2 | #include "RenderScript.h" |
| 3 | #include "Element.h" |
| 4 | #include "Type.h" |
| 5 | #include "Allocation.h" |
| 6 | |
| 7 | int main(int argc, char** argv) |
| 8 | { |
| 9 | |
| 10 | RenderScript *rs = new RenderScript(); |
| 11 | printf("New RS %p\n", rs); |
| 12 | |
Jason Sams | f70b0fc8 | 2012-02-22 15:22:41 -0800 | [diff] [blame] | 13 | bool r = rs->init(16); |
| 14 | printf("Init returned %i\n", r); |
| 15 | |
| 16 | const Element *e = Element::RGBA_8888(rs); |
| 17 | printf("Element %p\n", e); |
| 18 | |
| 19 | Type::Builder tb(rs, e); |
| 20 | tb.setX(128); |
| 21 | tb.setY(128); |
| 22 | const Type *t = tb.create(); |
| 23 | printf("Type %p\n", t); |
| 24 | |
| 25 | |
| 26 | const Allocation *a1 = Allocation::createSized(rs, e, 1000); |
| 27 | printf("Allocation %p\n", a1); |
| 28 | |
| 29 | |
Jason Sams | f70b0fc8 | 2012-02-22 15:22:41 -0800 | [diff] [blame] | 30 | |
| 31 | printf("Deleting stuff\n"); |
| 32 | delete t; |
| 33 | delete a1; |
| 34 | delete e; |
| 35 | delete rs; |
| 36 | printf("Delete OK\n"); |
| 37 | } |