title: SDL2: Can't get direct3d11 to show up as a renderer?
body: <p>I'm trying to get SDL to use "direct3d11" as the render driver, since "direct3d" does not support <a href="https://wiki.libsdl.org/SDL_ComposeCustomBlendMode#Remarks" rel="nofollow noreferrer">SDL_BLENDOPERATION_MAXIMUM</a>.</p>
  
  <p>According to <a href="https://stackoverflow.com/a/53269154/8267529">this post</a> on a related question, I should be able to see "direct3d11" as a renderer driver by looping through SDL's render drivers and printing them out.<br>
  However, the only drivers that I get are "direct3d", "opengl", "opengles2", and "software".<br>
  I tried doing what was suggested <a href="https://stackoverflow.com/a/53270255/8267529">here</a> but setting SDL_HINT_RENDER_DRIVER obviously has no effect since it doesn't even see "direct3d11" as an option (though oddly it doesn't give an error).<br>
  Unfortunately, that thread seems to have run dry, and general googling has been unhelpful.</p>
  
  <p><strong>So... why don't I see "direct3d11" as an option?</strong><br>
  Is this expected behavior?<br>
  Am I missing a step in SDL?<br>
  Is there some sort of Windows config I have to change?<br>
  Is there a special library I need to include for it to work?<br>
  Is there a magic compiler setting or define or something I need to set?<br>
  Does this test code work on other people's machines?<br>
  Any info or help would be appreciated.</p>
  
  <p>Some technical details:</p>
  
  <p>OS: Windows 10 (x64)<br>
  GPU: GeForce RTX 2060 (dxdiag lists Feature Levels as "12_1,12_0,11_1,11_0,10_1,10_0,9_3,9_2,9_1")</p>
  
  <p>I'm using Visual Studio 2017 (15.9.11)<br>
  Using SDL version 2.0.10<br>
  SDL defaults to "direct3d" as the render driver when creating an SDL_Renderer (not shown in test code)</p>
  
  <p>Test code:</p>
  
  <pre><code>#include &lt;SDL.h&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  int main(int argc, char *argv[]) {
      // init
      if (SDL_Init(SDL_INIT_EVERYTHING) &lt; 0) {
          std::cout &lt;&lt; "SDL could not be initialized: " &lt;&lt; SDL_GetError() &lt;&lt; std::endl;
      }
  
      // print SDL version
      SDL_version linked;
      SDL_GetVersion(&amp;linked);
      printf("SDL version %d.%d.%d\n", linked.major, linked.minor, linked.patch);
  
      // print size_t (see if 32 or 64 bit)
      cout &lt;&lt; sizeof(size_t) &lt;&lt; endl;
  
      // try to set hint
      cout &lt;&lt; SDL_SetHintWithPriority(SDL_HINT_RENDER_DRIVER, "direct3d11", SDL_HINT_OVERRIDE) &lt;&lt; endl;
  
      // print render drivers
      cout &lt;&lt; endl;
      for (int i = 0; i &lt; SDL_GetNumRenderDrivers(); i++){
          SDL_RendererInfo rendererInfo = {};
          SDL_GetRenderDriverInfo(i, &amp;rendererInfo);
          cout &lt;&lt; rendererInfo.name &lt;&lt; endl;
      }
      cout &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>
  
  <p>Result (64 bit compilation):</p>
  
  <pre><code>SDL version 2.0.10
  8
  1
  
  direct3d
  opengl
  opengles2
  software
  </code></pre>
  
  <p>Result (32 bit compilation):</p>
  
  <pre><code>SDL version 2.0.10
  4
  1
  
  direct3d
  opengl
  opengles2
  software
  </code></pre>
  
  <p>If you need more info, please let me know. I'm willing to test things if it would help.</p>