Horde3D

Next-Generation Graphics Engine
It is currently 16.09.2014, 18:25

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Shipping precompiled shaders?
PostPosted: 13.12.2011, 14:32 
Offline

Joined: 22.06.2010, 19:21
Posts: 26
Is there a simple way to precompile shaders instead of shipping .shader files with readable source with the executable?

Also, is there a suggested C++ container format to throw all ressource files into so I don't have to ship thousands of small files? Maybe just an uncompressed zlib wrapper used for streaming is a good idea, but I am not sure how well that would work.


Top
 Profile  
 
 Post subject: Re: Shipping precompiled shaders?
PostPosted: 14.12.2011, 02:58 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
GLSL simply doesn't support precompiled shaders :cry:

For file storage, we LZMA compress each file individually, then append them all together into a big binary blob with a table-of-contents (name to offset look-up table) at the start.


Top
 Profile  
 
 Post subject: Re: Shipping precompiled shaders?
PostPosted: 14.12.2011, 12:14 
Offline

Joined: 22.06.2010, 19:21
Posts: 26
:( Okay then, maybe I''ll just hardcode some checksum stuff into my code to make sure the users don't use modified shaders.

After careful selection, I just decided for PhysFS (http://icculus.org/physfs/), which seems pretty decent and can use 7zip (amongst a lot of others) as you suggested. Thank you for your help! :)


Top
 Profile  
 
 Post subject: Re: Shipping precompiled shaders?
PostPosted: 24.12.2011, 04:56 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
I've been sticking my shaders (and most other resources) into an SQLite database. Pretty easy to use and there's a great C++ oriented wrapper for the C api on code project. However, I was already using SQLite for paging and alife so it made sense in my situation.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group