summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mikos <david@FAMILYCOMPUTER.(none)>2008-02-21 19:09:33 +1030
committerDavid Mikos <david@FAMILYCOMPUTER.(none)>2008-02-21 19:09:33 +1030
commit52c1f39688c3f86b36d4893bbd30a4c47cd0082d (patch)
tree16f1efc51c88ac648b9759efe616cce3e650d5e7
parent81fc5ba5fab4a4044ac432bb3748ff01a846deb5 (diff)
downloadcubedbus-52c1f39688c3f86b36d4893bbd30a4c47cd0082d.tar.gz
cubedbus-52c1f39688c3f86b36d4893bbd30a4c47cd0082d.tar.bz2
Add fo (face outline) input to model loader.
-rw-r--r--cubedbusModel.c.in11
1 files changed, 7 insertions, 4 deletions
diff --git a/cubedbusModel.c.in b/cubedbusModel.c.in
index 471d213..83b13e5 100644
--- a/cubedbusModel.c.in
+++ b/cubedbusModel.c.in
@@ -343,7 +343,8 @@ cubedbusAddModelObject (CubedbusObject *obj, CompOption *option, int nOption)
nNormal++;
else if (!strcmp(tmpType, "vt"))
nTexture++;
- else if (!strcmp(tmpType, "f") || !strcmp(tmpType, "p") || !strcmp(tmpType, "l"))
+ else if (!strcmp(tmpType, "f") || !strcmp(tmpType, "fo") ||
+ !strcmp(tmpType, "p") || !strcmp(tmpType, "l") )
{
while ((tmpType=strsep(&strline, delim))!=NULL) {
nIndices++;
@@ -785,11 +786,12 @@ cubedbusAddModelObject (CubedbusObject *obj, CompOption *option, int nOption)
if (loadingMaterial)
updateGroup = TRUE;
}
- else if (!strcmp(tmpType, "f") || !strcmp(tmpType, "p") || !strcmp(tmpType, "l") )
+ else if (!strcmp(tmpType, "f") || !strcmp(tmpType, "fo") ||
+ !strcmp(tmpType, "p") || !strcmp(tmpType, "l") )
{
if (!strcmp(tmpType, "l") )
complexity = 1;
- else if (!strcmp(tmpType, "f"))
+ else if (!strcmp(tmpType, "f") || !strcmp(tmpType, "fo"))
complexity = 2;
char *tmpPtr; /* used to check value of vertex/texture/normal numbers */
@@ -1139,7 +1141,8 @@ cubedbusDeleteModelObject (CubedbusObject *obj)
{
CubedbusModelObject *data=obj->data;
- glDeleteLists (data->dList, 1);
+ if (!data->animation)
+ glDeleteLists (data->dList, 1);
int fc;
for (fc=0; fc<data->fileCounter; fc++) {