|
From: Jose' C. <cru...@ce...> - 2004-10-23 08:30:44
|
On 23/ott/04, at 01:25, James W. Walker wrote: > I was trying to run Geom Test in Classic, and found that it crashed in > QutTexture_CreateTextureObjectFromTGAFile. What seems to be happening > is that Q3MemoryStorage_New returns a storage object, but > Q3MemoryStorage_GetBuffer returns a NULL buffer. Similar things > happen with Handle storage objects. It's beginning to look as if QD3D > does not allow one to write to an internally-allocated memory storage > except using Q3Storage_SetData. Is that true? If so, it's really a > pain. > never used Memory storage that way, but I've used this for ages storageObj = ::Q3MemoryStorage_New(NULL,0); ::Q3File_SetStorage(fileObj, storageObj); ::Q3File_OpenWrite( fileObj, fileMode ); ::Q3View_StartWriting(dummyView, fileObj); ::Q3DisplayGroup_Submit(groupObj, dummyView); ::Q3View_EndWriting(dummyView); ::Q3File_Close(fileObj); ::Q3MemoryStorage_GetBuffer(storageObj, &buffer, &size, &count); metafile = operator new(size); memcpy(metafile,buffer,size); so probably QD3D has a lazy allocation, try using the Q3RawData_Write procedure to allocate the buffer and then get it or just allocate the buffer and pass it to Q3MemoryStorage_New Pax et Bonum # dott. Jose' Cruanyes Aguilar - C.E. Soft srl # Pzza. Firenze,4 MILANO - XX Settembre 10, CREMONA # 02,33603122 0372,460602 |