Add Java exceptions to catch RS calls with no context or no surface.

This commit is contained in:
Jason Sams
2009-12-07 12:40:12 -08:00
parent 6d42d80653
commit 771bebb940
11 changed files with 71 additions and 0 deletions

View File

@@ -30,10 +30,12 @@ public class Light extends BaseObj {
}
public void setColor(float r, float g, float b) {
mRS.validate();
mRS.nLightSetColor(mID, r, g, b);
}
public void setPosition(float x, float y, float z) {
mRS.validate();
mRS.nLightSetPosition(mID, x, y, z);
}
@@ -65,6 +67,7 @@ public class Light extends BaseObj {
}
public Light create() {
mRS.validate();
return internalCreate(mRS, this);
}
}