OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <stdio.h> | 8 #include <stdio.h> |
9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 case GL_STENCIL_VALUE_MASK: | 187 case GL_STENCIL_VALUE_MASK: |
188 return 1; | 188 return 1; |
189 case GL_STENCIL_WRITEMASK: | 189 case GL_STENCIL_WRITEMASK: |
190 return 1; | 190 return 1; |
191 case GL_SUBPIXEL_BITS: | 191 case GL_SUBPIXEL_BITS: |
192 return 1; | 192 return 1; |
193 case GL_TEXTURE_BINDING_2D: | 193 case GL_TEXTURE_BINDING_2D: |
194 return 1; | 194 return 1; |
195 case GL_TEXTURE_BINDING_CUBE_MAP: | 195 case GL_TEXTURE_BINDING_CUBE_MAP: |
196 return 1; | 196 return 1; |
| 197 case GL_TEXTURE_BINDING_EXTERNAL_OES: |
| 198 return 1; |
197 case GL_UNPACK_ALIGNMENT: | 199 case GL_UNPACK_ALIGNMENT: |
198 return 1; | 200 return 1; |
199 case GL_VIEWPORT: | 201 case GL_VIEWPORT: |
200 return 4; | 202 return 4; |
201 // -- glGetBooleanv, glGetFloatv, glGetIntergerv with | 203 // -- glGetBooleanv, glGetFloatv, glGetIntergerv with |
202 // GL_CHROMIUM_framebuffer_multisample | 204 // GL_CHROMIUM_framebuffer_multisample |
203 case GL_MAX_SAMPLES_EXT: | 205 case GL_MAX_SAMPLES_EXT: |
204 return 1; | 206 return 1; |
205 | 207 |
206 // -- glGetBufferParameteriv | 208 // -- glGetBufferParameteriv |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 case GL_FLOAT_MAT2: | 428 case GL_FLOAT_MAT2: |
427 return sizeof(GLfloat) * 2 * 2; // NOLINT | 429 return sizeof(GLfloat) * 2 * 2; // NOLINT |
428 case GL_FLOAT_MAT3: | 430 case GL_FLOAT_MAT3: |
429 return sizeof(GLfloat) * 3 * 3; // NOLINT | 431 return sizeof(GLfloat) * 3 * 3; // NOLINT |
430 case GL_FLOAT_MAT4: | 432 case GL_FLOAT_MAT4: |
431 return sizeof(GLfloat) * 4 * 4; // NOLINT | 433 return sizeof(GLfloat) * 4 * 4; // NOLINT |
432 case GL_SAMPLER_2D: | 434 case GL_SAMPLER_2D: |
433 return sizeof(GLint); // NOLINT | 435 return sizeof(GLint); // NOLINT |
434 case GL_SAMPLER_CUBE: | 436 case GL_SAMPLER_CUBE: |
435 return sizeof(GLint); // NOLINT | 437 return sizeof(GLint); // NOLINT |
| 438 case GL_SAMPLER_EXTERNAL_OES: |
| 439 return sizeof(GLint); // NOLINT |
436 default: | 440 default: |
437 return 0; | 441 return 0; |
438 } | 442 } |
439 } | 443 } |
440 | 444 |
441 size_t GLES2Util::GetGLTypeSizeForTexturesAndBuffers(uint32 type) { | 445 size_t GLES2Util::GetGLTypeSizeForTexturesAndBuffers(uint32 type) { |
442 switch (type) { | 446 switch (type) { |
443 case GL_BYTE: | 447 case GL_BYTE: |
444 return sizeof(GLbyte); // NOLINT | 448 return sizeof(GLbyte); // NOLINT |
445 case GL_UNSIGNED_BYTE: | 449 case GL_UNSIGNED_BYTE: |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 } | 569 } |
566 } | 570 } |
567 return GetStringEnum(value); | 571 return GetStringEnum(value); |
568 } | 572 } |
569 | 573 |
570 #include "../common/gles2_cmd_utils_implementation_autogen.h" | 574 #include "../common/gles2_cmd_utils_implementation_autogen.h" |
571 | 575 |
572 } // namespace gles2 | 576 } // namespace gles2 |
573 } // namespace gpu | 577 } // namespace gpu |
574 | 578 |
OLD | NEW |