| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 #define GL_DEPTH_COMPONENT24_OES 0x81A6 | 93 #define GL_DEPTH_COMPONENT24_OES 0x81A6 |
| 94 | 94 |
| 95 // GL_OES_depth32 | 95 // GL_OES_depth32 |
| 96 #define GL_DEPTH_COMPONENT32_OES 0x81A7 | 96 #define GL_DEPTH_COMPONENT32_OES 0x81A7 |
| 97 | 97 |
| 98 // GL_OES_packed_depth_stencil | 98 // GL_OES_packed_depth_stencil |
| 99 #define GL_DEPTH24_STENCIL8_OES 0x88F0 | 99 #define GL_DEPTH24_STENCIL8_OES 0x88F0 |
| 100 | 100 |
| 101 #define GL_GLEXT_PROTOTYPES 1 | 101 #define GL_GLEXT_PROTOTYPES 1 |
| 102 | 102 |
| 103 // GL_OES_get_program_binary |
| 104 #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 |
| 105 #define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE |
| 106 #define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF |
| 107 |
| 103 // Define this for extra GL error debugging (slower). | 108 // Define this for extra GL error debugging (slower). |
| 104 // #define GL_ERROR_DEBUGGING | 109 // #define GL_ERROR_DEBUGGING |
| 105 #ifdef GL_ERROR_DEBUGGING | 110 #ifdef GL_ERROR_DEBUGGING |
| 106 #define CHECK_GL_ERROR() do { \ | 111 #define CHECK_GL_ERROR() do { \ |
| 107 GLenum gl_error = glGetError(); \ | 112 GLenum gl_error = glGetError(); \ |
| 108 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ | 113 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ |
| 109 } while (0) | 114 } while (0) |
| 110 #else // GL_ERROR_DEBUGGING | 115 #else // GL_ERROR_DEBUGGING |
| 111 #define CHECK_GL_ERROR() void(0) | 116 #define CHECK_GL_ERROR() void(0) |
| 112 #endif // GL_ERROR_DEBUGGING | 117 #endif // GL_ERROR_DEBUGGING |
| 113 | 118 |
| 114 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 119 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
| OLD | NEW |