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