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