Tomas Rapkauskas <[EMAIL PROTECTED]> schrieb am 08.02.2006 08:37:07:
> 
> Hello,
> I would like to ask does lib3ds supports load data from memory?
> I have file data as "char *" and I could not found any function which would
> allow fill lib3ds structures from buffer.

Hi Tomas,

look in file "file.h". There you can find a function "Lib3dsBool 
lib3ds_file_read(Lib3dsFile *file, Lib3dsIo *io)". 
This function takes a Lib3dsIo data structure pointer as second argument, which 
can be an arbitrary io interface. 
Now, in "io.h", you find "lib3ds_io_new", which creates such a structure and 
takes the error/seek/tell/read/write 
callbacks as arguments. You have to implement these callback functions for your 
special case of reading from a 
buffer. the "void *self" is a pointer to an arbitrary data structure, which 
holds the data of your io interface. In your 
case eventually, it can be the buffer pointer itself.

greetings,   Torsten Blank
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
lib3ds-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lib3ds-devel

Reply via email to