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 | |
833 uint32 GLES2Util::GetGLReadPixelsImplementationFormat( | 812 uint32 GLES2Util::GetGLReadPixelsImplementationFormat( |
834 uint32 internal_format) { | 813 uint32 internal_format) { |
835 switch (internal_format) { | 814 switch (internal_format) { |
836 case GL_R8: | 815 case GL_R8: |
837 case GL_R16F: | 816 case GL_R16F: |
838 case GL_R32F: | 817 case GL_R32F: |
839 return GL_RED; | 818 return GL_RED; |
840 case GL_R8UI: | 819 case GL_R8UI: |
841 case GL_R8I: | 820 case GL_R8I: |
842 case GL_R16UI: | 821 case GL_R16UI: |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1369 } | 1348 } |
1370 | 1349 |
1371 return true; | 1350 return true; |
1372 } | 1351 } |
1373 | 1352 |
1374 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" | 1353 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" |
1375 | 1354 |
1376 } // namespace gles2 | 1355 } // namespace gles2 |
1377 } // namespace gpu | 1356 } // namespace gpu |
1378 | 1357 |
OLD | NEW |