docs/README-windows.md
author Philipp Wiesemann <philipp.wiesemann@arcor.de>
Thu, 21 May 2015 21:25:14 +0200
changeset 9609 897b25f560d0
parent 9025 d09d4b578e77
child 10486 5bf595c48fd4
permissions -rw-r--r--
Fixed undefined key access in test program.
gabomdq@9023
     1
Windows
gabomdq@9023
     2
================================================================================
gabomdq@9023
     3
gabomdq@9023
     4
================================================================================
gabomdq@9023
     5
OpenGL ES 2.x support
gabomdq@9023
     6
================================================================================
gabomdq@9023
     7
gabomdq@9023
     8
SDL has support for OpenGL ES 2.x under Windows via two alternative 
gabomdq@9023
     9
implementations. 
gabomdq@9023
    10
The most straightforward method consists in running your app in a system with 
gabomdq@9023
    11
a graphic card paired with a relatively recent (as of November of 2013) driver 
gabomdq@9023
    12
which supports the WGL_EXT_create_context_es2_profile extension. Vendors known 
gabomdq@9023
    13
to ship said extension on Windows currently include nVidia and Intel.
gabomdq@9023
    14
gabomdq@9023
    15
The other method involves using the ANGLE library (https://code.google.com/p/angleproject/)
gabomdq@9023
    16
If an OpenGL ES 2.x context is requested and no WGL_EXT_create_context_es2_profile
gabomdq@9023
    17
extension is found, SDL will try to load the libEGL.dll library provided by
gabomdq@9023
    18
ANGLE.
gabomdq@9023
    19
To obtain the ANGLE binaries, you can either compile from source from
gabomdq@9023
    20
https://chromium.googlesource.com/angle/angle or copy the relevant binaries from
gabomdq@9023
    21
a recent Chrome/Chromium install for Windows. The files you need are:
gabomdq@9023
    22
    
gabomdq@9023
    23
    * libEGL.dll
gabomdq@9023
    24
    * libGLESv2.dll
gabomdq@9023
    25
    * d3dcompiler_46.dll (supports Windows Vista or later, better shader compiler)
gabomdq@9023
    26
    or...
gabomdq@9023
    27
    * d3dcompiler_43.dll (supports Windows XP or later)
gabomdq@9023
    28
    
gabomdq@9023
    29
If you compile ANGLE from source, you can configure it so it does not need the
gabomdq@9023
    30
d3dcompiler_* DLL at all (for details on this, see their documentation). 
gabomdq@9023
    31
However, by default SDL will try to preload the d3dcompiler_46.dll to
gabomdq@9023
    32
comply with ANGLE's requirements. If you wish SDL to preload d3dcompiler_43.dll (to
gabomdq@9023
    33
support Windows XP) or to skip this step at all, you can use the 
gabomdq@9023
    34
SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more details).
gabomdq@9023
    35
gabomdq@9023
    36
Known Bugs:
gabomdq@9023
    37
    
gabomdq@9023
    38
    * SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears
gabomdq@9023
    39
      that there's a bug in the library which prevents the window contents from
gabomdq@9023
    40
      refreshing if this is set to anything other than the default value.
gabomdq@9023
    41