diff options
| author | Stenzek <stenzek@users.noreply.github.com> | 2017-08-01 12:39:20 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-01 12:39:19 +1000 |
| commit | fe65b26d53606fb9edf7e0db0e5b2c52f1ea3978 (patch) | |
| tree | 3183a95deab2f3f5a2a61de84fd03680fc28204d /Source/Core/Common | |
| parent | b93d118cef8dd8dd85bf662f5ad4abb083610d3e (diff) | |
| parent | 63305e917328d0ce9f3db6def51eaa67f23880ec (diff) | |
Merge pull request #5834 from stenzek/bc7
Support loading BC7 (BPTC) textures from DDS files
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Common.vcxproj | 1 | ||||
| -rw-r--r-- | Source/Core/Common/Common.vcxproj.filters | 3 | ||||
| -rw-r--r-- | Source/Core/Common/GL/GLExtensions/ARB_texture_compression_bptc.h | 29 | ||||
| -rw-r--r-- | Source/Core/Common/GL/GLExtensions/GLExtensions.h | 1 |
4 files changed, 34 insertions, 0 deletions
diff --git a/Source/Core/Common/Common.vcxproj b/Source/Core/Common/Common.vcxproj index 4c8d2f1b61..5af496cc9f 100644 --- a/Source/Core/Common/Common.vcxproj +++ b/Source/Core/Common/Common.vcxproj @@ -89,6 +89,7 @@ <ClInclude Include="GL\GLExtensions\ARB_shader_image_load_store.h" /> <ClInclude Include="GL\GLExtensions\ARB_shader_storage_buffer_object.h" /> <ClInclude Include="GL\GLExtensions\ARB_sync.h" /> + <ClInclude Include="GL\GLExtensions\ARB_texture_compression_bptc.h" /> <ClInclude Include="GL\GLExtensions\ARB_texture_multisample.h" /> <ClInclude Include="GL\GLExtensions\ARB_texture_storage.h" /> <ClInclude Include="GL\GLExtensions\ARB_texture_storage_multisample.h" /> diff --git a/Source/Core/Common/Common.vcxproj.filters b/Source/Core/Common/Common.vcxproj.filters index 10aa2c9d36..161557ddc0 100644 --- a/Source/Core/Common/Common.vcxproj.filters +++ b/Source/Core/Common/Common.vcxproj.filters @@ -254,6 +254,9 @@ </ClInclude> <ClInclude Include="File.h" /> <ClInclude Include="LdrWatcher.h" /> + <ClInclude Include="GL\GLExtensions\ARB_texture_compression_bptc.h"> + <Filter>GL\GLExtensions</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="CDUtils.cpp" /> diff --git a/Source/Core/Common/GL/GLExtensions/ARB_texture_compression_bptc.h b/Source/Core/Common/GL/GLExtensions/ARB_texture_compression_bptc.h new file mode 100644 index 0000000000..f5c27538e2 --- /dev/null +++ b/Source/Core/Common/GL/GLExtensions/ARB_texture_compression_bptc.h @@ -0,0 +1,29 @@ +/* +** Copyright (c) 2013-2015 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +#include "Common/GL/GLExtensions/gl_common.h" + +#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F diff --git a/Source/Core/Common/GL/GLExtensions/GLExtensions.h b/Source/Core/Common/GL/GLExtensions/GLExtensions.h index 7745d78e60..2c0364da48 100644 --- a/Source/Core/Common/GL/GLExtensions/GLExtensions.h +++ b/Source/Core/Common/GL/GLExtensions/GLExtensions.h @@ -25,6 +25,7 @@ #include "Common/GL/GLExtensions/ARB_shader_image_load_store.h" #include "Common/GL/GLExtensions/ARB_shader_storage_buffer_object.h" #include "Common/GL/GLExtensions/ARB_sync.h" +#include "Common/GL/GLExtensions/ARB_texture_compression_bptc.h" #include "Common/GL/GLExtensions/ARB_texture_multisample.h" #include "Common/GL/GLExtensions/ARB_texture_storage.h" #include "Common/GL/GLExtensions/ARB_texture_storage_multisample.h" |
