|
From: SourceForge.net <no...@so...> - 2004-06-06 06:01:48
|
Bugs item #967190, was opened at 2004-06-05 12:27 Message generated for change (Comment added) made by raving You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=442052&aid=967190&group_id=45158 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Lane Roathe (raving) Assigned to: Nobody/Anonymous (nobody) Summary: Quesa Fails loading objects Initial Comment: The version of Quesa that is in CVS fails to load objects in Bugdom. I am using an older (much older!) version of Quesa in Bugdom now that loads these files correctly. I'd really like to update to the latest Quesa due to the speed improvements, but have not been able to sort out why the files do not load. I've attached the items that fail to load before the project crashes to this report. My working copy of Quesa is here in case anyone needs it again: ftp://ftp.ifd.com/pub/Quesa_Bugdom.zip Here is the function used to load the files: /***************** READ 3DMF MODEL ************************/ // // Reads the 3DMF file and saves into new struct OpaqueTQ3Object*. // // INPUT: file = File Object containing reference to 3DMF file // // OUTPUT: model =object containing all the important data in the 3DMF file // // static TQ3Status MyRead3DMFModel(TQ3FileObject file, struct OpaqueTQ3Object* *model) { struct OpaqueTQ3Object* myGroup; struct OpaqueTQ3Object* myObject; /* INIT MODEL TO BE RETURNED */ *model = 0; // assume return nothing myGroup = myObject = 0; /* OPEN THE FILE OBJECT & EXIT GRACEFULLY IF UNSUCCESSFUL */ if (Q3File_OpenRead(file,0) != kQ3Success) // open the file DoFatalAlert("Reading 3DMF file failed!"); /**************************************/ /* READ ALL THE OBJECTS FROM THE FILE */ /**************************************/ do { /* READ A METAFILE OBJECT FROM THE FILE OBJECT */ myObject = Q3File_ReadObject(file); if (myObject == 0) { if (myGroup) Q3Object_Dispose(myGroup); DoAlert("MyRead3DMFModel: Q3File_ReadObject Failed!"); QD3D_ShowRecentError(); break; } /* ADD ANY DRAWABLE OBJECTS TO A GROUP */ if (Q3Object_IsDrawable(myObject)) // see if is a drawable object { if (myGroup) // if group exists Q3Group_AddObject(myGroup,myObject); // add object to group else if (*model == 0) // if no model data yet / this is first { *model = myObject; // set model to this object myObject = 0; // clear this object } else // this isn't the first & only object, so add to group { myGroup = Q3DisplayGroup_New(); // make new group if (myGroup == 0) DoFatalAlert("MyRead3DMFModel: Q3DisplayGroup_New failed!"); Q3Group_AddObject(myGroup,*model); // add existing model to group Q3Group_AddObject(myGroup,myObject); // add object to group Q3Object_Dispose(*model); // dispose extra ref *model = myGroup; // set return value to the new group } } if (myObject != 0) // dispose extra ref Q3Object_Dispose(myObject); } while(!Q3File_IsEndOfFile(file)); /* SEE IF ANYTHING WENT WRONG */ if (Q3Error_Get(0) != kQ3ErrorNone) { if (*model != 0) { Q3Object_Dispose(*model); *model = 0; } return(kQ3Failure); } return(kQ3Success); } ---------------------------------------------------------------------- >Comment By: Lane Roathe (raving) Date: 2004-06-06 01:01 Message: Logged In: YES user_id=48487 For some reason SF will not accept my attachments; probably requires that I use IE on Windows XP or some ... Anyway, I put the archive of the files that Quesa fails on online: <ftp://ftp.ifd.com/pub/Bugdom_3dmfs.zip> ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=442052&aid=967190&group_id=45158 |