Build config file into executable?

Posted by REM on Stack Overflow See other posts from Stack Overflow or by REM
Published on 2010-05-20T19:17:26Z Indexed on 2010/05/20 19:20 UTC
Read the original article Hit count: 198

Filed under:
|
|

I am currently working on a little graphics demo (using DirectX) which is primarily based around an HLSL shader I am working on. Using the D3DX10CreateEffectFromFile I am loading (and compiling the shader) at runtime as I find it easier for tweaking.

However, once I am done I'd like to do some combination of the following:

  • Pre-compile the shader so the demo starts up faster for the user
  • Bury (compile into the executable) the compiled shader (or maybe just the source if necessary)

Primarily, I want to do this because I want the demo to just be one file that can be very easily copied around.

One thing I could easily do is just put the source text right into a cpp but that would be very tedious I needed to update it later.

Is it possible to do something like this (using Visual Studio, DirectX, HLSL)?

© Stack Overflow or respective owner

Related posts about directx

Related posts about hlsl