| 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 includes all the necessary GL headers and implements some useful | 5 // This file includes all the necessary GL headers and implements some useful |
| 6 // utilities. | 6 // utilities. |
| 7 | 7 |
| 8 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 8 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
| 9 #define GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 9 #define GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 // GL_OES_EGL_image_external | 36 // GL_OES_EGL_image_external |
| 37 #define GL_TEXTURE_EXTERNAL_OES 0x8D65 | 37 #define GL_TEXTURE_EXTERNAL_OES 0x8D65 |
| 38 #define GL_SAMPLER_EXTERNAL_OES 0x8D66 | 38 #define GL_SAMPLER_EXTERNAL_OES 0x8D66 |
| 39 #define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 | 39 #define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 |
| 40 #define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 | 40 #define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 |
| 41 | 41 |
| 42 // GL_ANGLE_translated_shader_source | 42 // GL_ANGLE_translated_shader_source |
| 43 #define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 | 43 #define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 |
| 44 | 44 |
| 45 // GL_CHROMIUM_flipy | |
| 46 #define GL_UNPACK_FLIP_Y_CHROMIUM 0x9240 | |
| 47 | |
| 48 #define GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM 0x9241 | |
| 49 #define GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM 0x9243 | |
| 50 | |
| 51 // GL_ANGLE_pack_reverse_row_order | 45 // GL_ANGLE_pack_reverse_row_order |
| 52 #define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4 | 46 #define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4 |
| 53 | 47 |
| 54 // GL_ANGLE_texture_usage | 48 // GL_ANGLE_texture_usage |
| 55 #define GL_TEXTURE_USAGE_ANGLE 0x93A2 | 49 #define GL_TEXTURE_USAGE_ANGLE 0x93A2 |
| 56 #define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3 | 50 #define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3 |
| 57 | 51 |
| 58 // GL_EXT_texture_storage | 52 // GL_EXT_texture_storage |
| 59 #define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F | 53 #define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F |
| 60 #define GL_ALPHA8_EXT 0x803C | 54 #define GL_ALPHA8_EXT 0x803C |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 #ifdef GL_ERROR_DEBUGGING | 87 #ifdef GL_ERROR_DEBUGGING |
| 94 #define CHECK_GL_ERROR() do { \ | 88 #define CHECK_GL_ERROR() do { \ |
| 95 GLenum gl_error = glGetError(); \ | 89 GLenum gl_error = glGetError(); \ |
| 96 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ | 90 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ |
| 97 } while (0) | 91 } while (0) |
| 98 #else // GL_ERROR_DEBUGGING | 92 #else // GL_ERROR_DEBUGGING |
| 99 #define CHECK_GL_ERROR() void(0) | 93 #define CHECK_GL_ERROR() void(0) |
| 100 #endif // GL_ERROR_DEBUGGING | 94 #endif // GL_ERROR_DEBUGGING |
| 101 | 95 |
| 102 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 96 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
| OLD | NEW |