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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 case GL_FLOAT_MAT2: | 426 case GL_FLOAT_MAT2: |
427 return sizeof(GLfloat) * 2 * 2; // NOLINT | 427 return sizeof(GLfloat) * 2 * 2; // NOLINT |
428 case GL_FLOAT_MAT3: | 428 case GL_FLOAT_MAT3: |
429 return sizeof(GLfloat) * 3 * 3; // NOLINT | 429 return sizeof(GLfloat) * 3 * 3; // NOLINT |
430 case GL_FLOAT_MAT4: | 430 case GL_FLOAT_MAT4: |
431 return sizeof(GLfloat) * 4 * 4; // NOLINT | 431 return sizeof(GLfloat) * 4 * 4; // NOLINT |
432 case GL_SAMPLER_2D: | 432 case GL_SAMPLER_2D: |
433 return sizeof(GLint); // NOLINT | 433 return sizeof(GLint); // NOLINT |
434 case GL_SAMPLER_CUBE: | 434 case GL_SAMPLER_CUBE: |
435 return sizeof(GLint); // NOLINT | 435 return sizeof(GLint); // NOLINT |
| 436 case GL_SAMPLER_EXTERNAL_OES: |
| 437 return sizeof(GLint); // NOLINT |
436 default: | 438 default: |
437 return 0; | 439 return 0; |
438 } | 440 } |
439 } | 441 } |
440 | 442 |
441 size_t GLES2Util::GetGLTypeSizeForTexturesAndBuffers(uint32 type) { | 443 size_t GLES2Util::GetGLTypeSizeForTexturesAndBuffers(uint32 type) { |
442 switch (type) { | 444 switch (type) { |
443 case GL_BYTE: | 445 case GL_BYTE: |
444 return sizeof(GLbyte); // NOLINT | 446 return sizeof(GLbyte); // NOLINT |
445 case GL_UNSIGNED_BYTE: | 447 case GL_UNSIGNED_BYTE: |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 } | 567 } |
566 } | 568 } |
567 return GetStringEnum(value); | 569 return GetStringEnum(value); |
568 } | 570 } |
569 | 571 |
570 #include "../common/gles2_cmd_utils_implementation_autogen.h" | 572 #include "../common/gles2_cmd_utils_implementation_autogen.h" |
571 | 573 |
572 } // namespace gles2 | 574 } // namespace gles2 |
573 } // namespace gpu | 575 } // namespace gpu |
574 | 576 |
OLD | NEW |