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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 // GL_OES_packed_depth_stencil | 104 // GL_OES_packed_depth_stencil |
105 #define GL_DEPTH24_STENCIL8_OES 0x88F0 | 105 #define GL_DEPTH24_STENCIL8_OES 0x88F0 |
106 | 106 |
107 // GL_OES_compressed_ETC1_RGB8_texture | 107 // GL_OES_compressed_ETC1_RGB8_texture |
108 #define GL_ETC1_RGB8_OES 0x8D64 | 108 #define GL_ETC1_RGB8_OES 0x8D64 |
109 | 109 |
110 // GL_OES_vertex_array_object | 110 // GL_OES_vertex_array_object |
111 #define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 | 111 #define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 |
112 | 112 |
| 113 // GL_CHROMIUM_pixel_transfer_buffer_object |
| 114 #define GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM 0x78EC |
| 115 #define GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM 0x78EF |
| 116 |
113 #define GL_GLEXT_PROTOTYPES 1 | 117 #define GL_GLEXT_PROTOTYPES 1 |
114 | 118 |
115 // GL_ARB_get_program_binary | 119 // GL_ARB_get_program_binary |
116 #define PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 | 120 #define PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 |
117 // GL_OES_get_program_binary | 121 // GL_OES_get_program_binary |
118 #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 | 122 #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 |
119 #define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE | 123 #define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE |
120 #define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF | 124 #define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF |
121 | 125 |
122 // Define this for extra GL error debugging (slower). | 126 // Define this for extra GL error debugging (slower). |
123 // #define GL_ERROR_DEBUGGING | 127 // #define GL_ERROR_DEBUGGING |
124 #ifdef GL_ERROR_DEBUGGING | 128 #ifdef GL_ERROR_DEBUGGING |
125 #define CHECK_GL_ERROR() do { \ | 129 #define CHECK_GL_ERROR() do { \ |
126 GLenum gl_error = glGetError(); \ | 130 GLenum gl_error = glGetError(); \ |
127 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ | 131 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ |
128 } while (0) | 132 } while (0) |
129 #else // GL_ERROR_DEBUGGING | 133 #else // GL_ERROR_DEBUGGING |
130 #define CHECK_GL_ERROR() void(0) | 134 #define CHECK_GL_ERROR() void(0) |
131 #endif // GL_ERROR_DEBUGGING | 135 #endif // GL_ERROR_DEBUGGING |
132 | 136 |
133 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 137 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
OLD | NEW |