Loading Mesh From Stream with Irrlicht.net

Started by
1 comment, last by disanti 15 years, 8 months ago
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?
Advertisement
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!
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
My game development blog: http://rykerlabs.com

This topic is closed to new replies.

Advertisement