WinRT: made OpenGL window-init work with latest round of ANGLE/WinRT updates
authorDavid Ludwig <dludwig@pobox.com>
Tue, 17 Mar 2015 19:45:47 -0400
changeset 938665e802af5d0e
parent 9385 1bc5372ee27f
child 9387 63c918e10bd7
WinRT: made OpenGL window-init work with latest round of ANGLE/WinRT updates

Various constants in ANGLE/WinRT, both in MSOpenTech's ms-master branch, and
in Google's branch, were changed again. This change makes SDL/WinRT work with
them.

To note, the ms-master branch (of ANGLE) was updated via this merge:
https://github.com/MSOpenTech/angle/commit/bbd2eb0a9c453a941f2c7abacf616d5a66b6be92#diff-d1377fbe747de154e1bfcf7221d3de67
src/video/winrt/SDL_winrtopengles.cpp
     1.1 --- a/src/video/winrt/SDL_winrtopengles.cpp	Tue Mar 17 10:25:21 2015 -0400
     1.2 +++ b/src/video/winrt/SDL_winrtopengles.cpp	Tue Mar 17 19:45:47 2015 -0400
     1.3 @@ -36,13 +36,15 @@
     1.4  
     1.5  /* ANGLE/WinRT constants */
     1.6  static const int ANGLE_D3D_FEATURE_LEVEL_ANY = 0;
     1.7 -#define EGL_PLATFORM_ANGLE_ANGLE                        0x3201
     1.8 -#define EGL_PLATFORM_ANGLE_TYPE_ANGLE                   0x3202
     1.9 -#define EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE      0x3203
    1.10 -#define EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE      0x3204
    1.11 -#define EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE           0x3205
    1.12 -#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE             0x3207
    1.13 -#define EGL_PLATFORM_ANGLE_USE_WARP_ANGLE               0x3208
    1.14 +#define EGL_PLATFORM_ANGLE_ANGLE                        0x3202
    1.15 +#define EGL_PLATFORM_ANGLE_TYPE_ANGLE                   0x3203
    1.16 +#define EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE      0x3204
    1.17 +#define EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE      0x3205
    1.18 +#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE             0x3208
    1.19 +#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE            0x3209
    1.20 +#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE       0x320B
    1.21 +#define EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE  0x320F
    1.22 +
    1.23  #define EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER   0x320B
    1.24  
    1.25  
    1.26 @@ -98,7 +100,8 @@
    1.27          const EGLint defaultDisplayAttributes[] =
    1.28          {
    1.29              EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
    1.30 -            EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, 
    1.31 +            EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE,
    1.32 +            EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE,
    1.33              EGL_NONE,
    1.34          };
    1.35  
    1.36 @@ -107,15 +110,17 @@
    1.37              EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
    1.38              EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE, 9,
    1.39              EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE, 3,
    1.40 -            EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, 
    1.41 +            EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE,
    1.42 +            EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE,
    1.43              EGL_NONE,
    1.44          };
    1.45  
    1.46          const EGLint warpDisplayAttributes[] =
    1.47          {
    1.48              EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
    1.49 -            EGL_PLATFORM_ANGLE_USE_WARP_ANGLE, EGL_TRUE,
    1.50 -            EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, 
    1.51 +            EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE,
    1.52 +            EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE,
    1.53 +            EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE,
    1.54              EGL_NONE,
    1.55          };
    1.56