hi,
i looked at the sourcecode of irrklang some days ago and i saw i gives me the possibility to save sound files in "code", so i can hardcode them.
so now i had the idea of "hardcoding" meshes, something like saving them in a string and load them from there then, maybe write a converter, wich makes a scenenode from it on runtime.
question now is, does this make sense`? one plus would be that you would'nt have to load any meshes from files anymore, and i can imagine that it would load somewhat faster...
and for meshes like a simple bar or a lowPoly model it wouldnt be THAT big...
what do you think? has anyone experience in this?
hardcoded meshes
-
psychophoniac
- Posts: 101
- Joined: Wed Dec 03, 2008 5:33 pm
- Location: ger
hardcoded meshes
i love skateboarding!
-
Lil Margin
- Posts: 212
- Joined: Sun Jul 19, 2009 4:24 am
- Location: Netherlands Antilles, Curacao
there are some progs out like bin2ascii or bin2hex...
with it you can make text files out of your mesh(es) that you can include to your source code (the BuiltInFont.h is an example of this using a bitmap)...
then it should be no problem to make a memory read file out of it and load the mesh...
with it you can make text files out of your mesh(es) that you can include to your source code (the BuiltInFont.h is an example of this using a bitmap)...
then it should be no problem to make a memory read file out of it and load the mesh...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:

http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
psychophoniac
- Posts: 101
- Joined: Wed Dec 03, 2008 5:33 pm
- Location: ger
ASCII is inside the exe, thus loaded by the exe loader of the OS and duplicated in memory! However for my last demo I grouped several files as a single zip; for security reasons not performances or memory. From the performances point of view it avoids to read on hard disk, expensive system calls (relatively expensive)... But well... loading time is done for this.
-
psychophoniac
- Posts: 101
- Joined: Wed Dec 03, 2008 5:33 pm
- Location: ger