| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file is here so other GLES2 related files can have a common set of | 5 // This file is here so other GLES2 related files can have a common set of |
| 6 // includes where appropriate. | 6 // includes where appropriate. |
| 7 | 7 |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
| 10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: | 802 case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: |
| 803 return 4; | 803 return 4; |
| 804 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: | 804 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: |
| 805 return 5; | 805 return 5; |
| 806 default: | 806 default: |
| 807 NOTREACHED(); | 807 NOTREACHED(); |
| 808 return 0; | 808 return 0; |
| 809 } | 809 } |
| 810 } | 810 } |
| 811 | 811 |
| 812 uint32_t GLES2Util::GLTextureTargetToBindingTarget(uint32_t textarget) { |
| 813 switch (textarget) { |
| 814 case GL_TEXTURE_2D: |
| 815 case GL_TEXTURE_EXTERNAL_OES: |
| 816 case GL_TEXTURE_RECTANGLE_ARB: |
| 817 case GL_TEXTURE_3D: |
| 818 case GL_TEXTURE_2D_ARRAY: |
| 819 return textarget; |
| 820 case GL_TEXTURE_CUBE_MAP_POSITIVE_X: |
| 821 case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: |
| 822 case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: |
| 823 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: |
| 824 case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: |
| 825 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: |
| 826 return GL_TEXTURE_CUBE_MAP; |
| 827 default: |
| 828 NOTREACHED(); |
| 829 return GL_TEXTURE_2D; |
| 830 } |
| 831 } |
| 832 |
| 812 uint32 GLES2Util::GetGLReadPixelsImplementationFormat( | 833 uint32 GLES2Util::GetGLReadPixelsImplementationFormat( |
| 813 uint32 internal_format) { | 834 uint32 internal_format) { |
| 814 switch (internal_format) { | 835 switch (internal_format) { |
| 815 case GL_R8: | 836 case GL_R8: |
| 816 case GL_R16F: | 837 case GL_R16F: |
| 817 case GL_R32F: | 838 case GL_R32F: |
| 818 return GL_RED; | 839 return GL_RED; |
| 819 case GL_R8UI: | 840 case GL_R8UI: |
| 820 case GL_R8I: | 841 case GL_R8I: |
| 821 case GL_R16UI: | 842 case GL_R16UI: |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1348 } | 1369 } |
| 1349 | 1370 |
| 1350 return true; | 1371 return true; |
| 1351 } | 1372 } |
| 1352 | 1373 |
| 1353 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" | 1374 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" |
| 1354 | 1375 |
| 1355 } // namespace gles2 | 1376 } // namespace gles2 |
| 1356 } // namespace gpu | 1377 } // namespace gpu |
| 1357 | 1378 |
| OLD | NEW |