Seperate ProgramVertex from RenderScript.java and merge ProgramVertexAlloc into the ProgramVertex class.

This commit is contained in:
Jason Sams
2009-08-04 18:47:46 -07:00
parent a2136d6b18
commit 110195fe9f
9 changed files with 244 additions and 216 deletions

View File

@ -251,55 +251,6 @@ public class RenderScript {
return new TriangleMesh(id);
}
//////////////////////////////////////////////////////////////////////////////////
// ProgramVertex
public class ProgramVertex extends BaseObj {
ProgramVertex(int id) {
super(RenderScript.this);
mID = id;
}
public void destroy() {
nProgramVertexDestroy(mID);
mID = 0;
}
public void bindAllocation(int slot, Allocation va) {
nProgramVertexBindAllocation(mID, slot, va.mID);
}
}
public void programVertexBegin(Element in, Element out) {
int inID = 0;
int outID = 0;
if (in != null) {
inID = in.mID;
}
if (out != null) {
outID = out.mID;
}
nProgramVertexBegin(inID, outID);
}
public void programVertexSetType(int slot, Type t) {
nProgramVertexSetType(slot, t.mID);
}
public void programVertexSetTextureMatrixEnable(boolean enable) {
nProgramVertexSetTextureMatrixEnable(enable);
}
public void programVertexAddLight(Light l) {
nProgramVertexAddLight(l.mID);
}
public ProgramVertex programVertexCreate() {
int id = nProgramVertexCreate();
return new ProgramVertex(id);
}
//////////////////////////////////////////////////////////////////////////////////
// File