Suggestion: customizable data loading.

Started by
-1 comments, last by metalion 24 years, 4 months ago
Using WGTLIB files in Power Rener seems nice and working very well.
But many programmers may have their own methods of managing data.
(Ex: own methods of compressing data, own methods of encrypting.)

My suggestion is like this:
Let Power Render users customize data loading
by setting some function pointers with pre-defined specification.


I saw some data-compress lib providing just one function.
-> void uncompress_data(int (*read_byte()),int (*write_byte()));

With my own read/write functions,
I was able to successfully customize that function.


For example,
(1) I call PR_LoadTexture("my texture")
(2) PR_LoadTexture calls back my own function requesting to open it.
-> HANDLE open_data(char DataName[]);
(3) PR_LoadTexture takes the bytes with successive calls to my own function.
It's over when it returns EOF(-1).
-> int get_byte(HANDLE h);
(4) PR_LoadTexture calls back my own function saying it's over.
-> void close_data(HANDLE h);


If U think this useful,
please consider including in next release of PR.

This topic is closed to new replies.

Advertisement