Adding getters to rs program obejcts.
Change-Id: Iff8ccc1835109d303201d6a1adb6e5cbde8ba634
This commit is contained in:
@ -76,6 +76,40 @@ public class Program extends BaseObj {
|
||||
super(id, rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public int getConstantCount() {
|
||||
return mConstants != null ? mConstants.length : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public Type getConstant(int slot) {
|
||||
if (slot < 0 || slot >= mConstants.length) {
|
||||
throw new IllegalArgumentException("Slot ID out of range.");
|
||||
}
|
||||
return mConstants[slot];
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public int getTextureCount() {
|
||||
return mTextureCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public TextureType getTextureType(int slot) {
|
||||
if ((slot < 0) || (slot >= mTextureCount)) {
|
||||
throw new IllegalArgumentException("Slot ID out of range.");
|
||||
}
|
||||
return mTextures[slot];
|
||||
}
|
||||
|
||||
/**
|
||||
* Binds a constant buffer to be used as uniform inputs to the
|
||||
* program
|
||||
|
Reference in New Issue
Block a user