Jump to content

  • Log In with Google      Sign In   
  • Create Account

vital exe resources


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 proanim   Members   -  Reputation: 454

Like
0Likes
Like

Posted 18 January 2014 - 06:06 PM

I am looking for a way to load shaders for exe when using directx, but now since I directx has its own functions for loading this stuff i don't think putting them in exe as resource files will work. I want this so I can distribute my program as stand-alone application without need of installation. Is there a way to do this? or am I required to give this stuff with the exe?



#2 SeanMiddleditch   Crossbones+   -  Reputation: 14770

Like
1Likes
Like

Posted 18 January 2014 - 11:11 PM

I am looking for a way to load shaders for exe when using directx, but now since I directx has its own functions for loading this stuff i don't think putting them in exe as resource files will work. I want this so I can distribute my program as stand-alone application without need of installation. Is there a way to do this? or am I required to give this stuff with the exe?

 

What do you think won't work with this?  You just need to distribute the _compiled_ shaders (created with fxc) instead of raw sources.



#3 Bacterius   Crossbones+   -  Reputation: 12841

Like
0Likes
Like

Posted 19 January 2014 - 01:11 AM

 

I am looking for a way to load shaders for exe when using directx, but now since I directx has its own functions for loading this stuff i don't think putting them in exe as resource files will work. I want this so I can distribute my program as stand-alone application without need of installation. Is there a way to do this? or am I required to give this stuff with the exe?

 

What do you think won't work with this?  You just need to distribute the _compiled_ shaders (created with fxc) instead of raw sources.

 

 

There's no problem with embedding raw shader source code as resources too, though you might prefer not to because of longer loading times (or obfuscation).


“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”


#4 ApochPiQ   Moderators   -  Reputation: 19913

Like
4Likes
Like

Posted 19 January 2014 - 02:45 AM

Begin with FindResource, hand off the result to LoadResource, and then invoke LockResource to get a pointer to the data. You can then hand that same pointer to your graphics API of choice to load the shader resource, either as raw source or as a compiled binary form.
Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.




PARTNERS