Jump to content
  • Advertisement
Sign in to follow this  
stringa

How to manage Lot's O'Shaders ... ?

This topic is 3530 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello... I'm wondering about managing shaders. What If I wanna use upwards of 20 different shaders in a given game loop. I know that D3D gives you a D3DXCompile application so you can compile pre-game and then just load and delete shaders as needed. What can I do ? What are my options? thanks, stringa

Share this post


Link to post
Share on other sites
Advertisement
nvidia: use cgc.exe to compile to asm
ati: stick with glsl, that requires recompilation of shaders on each game-boot.

Share this post


Link to post
Share on other sites
The ARB was too retarded to include binary blobs in GL3 (ignoring the overwhelming demand from developers, as usual), so realistically, you'll have to live with compiling the shaders at startup.

Or switch to D3D.

Share this post


Link to post
Share on other sites
Quote:
Original post by stringa
I'm wondering about managing shaders. What If I wanna use upwards of 20 different shaders in a given game loop. I know that D3D gives you a D3DXCompile application so you can compile pre-game and then just load and delete shaders as needed.
Load all your shaders at load time (when the application starts, or right before a level), and just use them as necessary. OpenGL will take care of loading them in and out of the GPU when you call glUseProgram().

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!