Adding support for all allowed textures.

Cleaning up unused code
Adding error messages

Change-Id: I3a92476738ff7699d49feeafcd3eee6f70621acb
This commit is contained in:
Alex Sakhartchouk
2010-09-23 16:16:33 -07:00
parent 5eb22e2ce1
commit b89aaacb2c
25 changed files with 284 additions and 283 deletions

View File

@@ -154,6 +154,13 @@ public class Program extends BaseObj {
mOutputs[mOutputCount++] = e;
}
void resetConstant() {
mConstantCount = 0;
for(int i = 0; i < MAX_CONSTANT; i ++) {
mConstants[i] = null;
}
}
public int addConstant(Type t) throws IllegalStateException {
// Should check for consistant and non-conflicting names...
if(mConstantCount >= MAX_CONSTANT) {
@@ -165,7 +172,7 @@ public class Program extends BaseObj {
public BaseProgramBuilder setTextureCount(int count) throws IllegalArgumentException {
// Should check for consistant and non-conflicting names...
if(count >= MAX_CONSTANT) {
if(count >= MAX_TEXTURE) {
throw new IllegalArgumentException("Max texture count exceeded.");
}
mTextureCount = count;