Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Custom file stream  (Read 21394 times)

0 Members and 1 Guest are viewing this topic.

bullno1

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Custom file stream
« on: October 06, 2008, 06:17:32 pm »
Currently, the library only support loading resources from file or from memory. It will be nicer if it supports a custom file stream interface where data input can be overriden by users. Something like:

class IInputStream:
{
 virtual void* readData(int size)=0;
 virtual void release()=0;//called when SFML's done with this stream
};

This will give chances for things like: virtual file system, resource protection, mod (files from a mod override files from the original game...), online streaming ...

I know it's possible to load everything into memory, decrypt then feed it to sfml but for streamed resources like video or music, it defeats the purpose of streaming

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Custom file stream
« Reply #1 on: October 06, 2008, 06:58:56 pm »
It's already on my private todo-list, I just wait to have enough time to think more about it and decide what to do with it (put it on the public roadmap, or drop it) ;)
Laurent Gomila - SFML developer

 

anything