Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualMJP

Posted 28 January 2013 - 01:22 AM

To answer  all 3 of your questions, you can only ever have 1 shader bound for each stage. So 1 vertex shader, 1 pixel shader, etc. That same shader has to be used for all primitives rendered by any single Draw call. So in your case you need to use multiple Draw calls to draw all of your models if some of those models require different shaders.

 

EDIT: I missed your fourth question...you need to pass a pointer to the compiled bytecode of a vertex shader in order to create an input layout.


#1MJP

Posted 28 January 2013 - 12:01 AM

To answer  all 3 of your questions, you can only ever have 1 shader bound for each stage. So 1 vertex shader, 1 pixel shader, etc. That same shader has to be used for all primitives rendered by any single Draw call. So in your case you need to use multiple Draw calls to draw all of your models if some of those models require different shaders.


PARTNERS