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