Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Suggestion: customizable data loading.

This topic is 6896 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!