Fixing renderscript uniform binding bugs.

Working on custom shaders.

Change-Id: I0d51e879e1c2b46ef5ab696b35162898f4196fc8
This commit is contained in:
Alex Sakhartchouk
2010-08-27 16:10:55 -07:00
parent ba4da86add
commit a41174ecb0
10 changed files with 362 additions and 43 deletions

View File

@@ -107,14 +107,10 @@ public class ProgramVertex extends Program {
public Allocation mAlloc;
public MatrixAllocation(RenderScript rs) {
mModel = new Matrix4f();
mProjection = new Matrix4f();
mTexture = new Matrix4f();
mAlloc = Allocation.createSized(rs, Element.createUser(rs, Element.DataType.FLOAT_32), 48);
mAlloc.subData1D(MODELVIEW_OFFSET, 16, mModel.mMat);
mAlloc.subData1D(PROJECTION_OFFSET, 16, mProjection.mMat);
mAlloc.subData1D(TEXTURE_OFFSET, 16, mTexture.mMat);
loadModelview(new Matrix4f());
loadProjection(new Matrix4f());
loadTexture(new Matrix4f());
}
public void destroy() {