Begin implementing SimpleMesh and fix some bugs with refcounting and java object destruction tracking.

This commit is contained in:
Jason Sams
2009-08-09 17:01:55 -07:00
parent 467f3df13d
commit 1bada8cd6e
32 changed files with 943 additions and 151 deletions

View File

@ -137,8 +137,11 @@ public class Element extends BaseObj {
if(mIsPredefined) {
throw new IllegalStateException("Attempting to destroy a predefined Element.");
}
if(mDestroyed) {
throw new IllegalStateException("Object already destroyed.");
}
mDestroyed = true;
mRS.nElementDestroy(mID);
mID = 0;
}
@ -206,7 +209,7 @@ public class Element extends BaseObj {
if (en.mIsNormalized) {
norm = 1;
}
rs.nElementAdd(en.mType.mID, en.mKind.mID, norm, en.mBits);
rs.nElementAdd(en.mKind.mID, en.mType.mID, norm, en.mBits);
}
}
int id = rs.nElementCreate();