Sign in to follow this  
Craig_jb

Loading Mesh From Stream with Irrlicht.net

Recommended Posts

Craig_jb    181
I am using custom datafiles for the storage of all my game's assets, but I am having trouble loading some resources into Irrlicht from it. Is there anyway to load Irrlicht animated meshs and textures from a .net stream?

Share this post


Link to post
Share on other sites
Craig_jb    181
I could store all the game's meshes and textures in a zip file which irrlicht can load from and store all the other data in the custom datafiles. However, I would like to stick to one not two resource locations. Any help appreciated!

Share this post


Link to post
Share on other sites
disanti    174
You will probably have better luck with this question in the Irrlicht forums.
But to attempt to answer your question, a quick look at the documentation reveals that there is no easy way to do what you want. You're probably going to have to create irr::io::IReadFile classes from memory (which can be done with the IFileSystem), and then pass those IReadFiles to the mesh/texture loading functions (such as ISceneManager::GetMesh).

Looks like you have two options, you can write a method to easily load meshes and textures and use that to initialize your scene, or you can modify the Irrlicht source code to use your resource system.

Oh, and I just noticed you want to do this with a .NET file stream. In this case, just load the whole of the stream data into memory, and pass it to the creation of the IReadFile.

Hope this helps,

Relavent documentation can be found at:
Link 1
Link 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this