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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 #define GL_CURRENT_QUERY_EXT 0x8865 | 81 #define GL_CURRENT_QUERY_EXT 0x8865 |
82 #define GL_QUERY_RESULT_EXT 0x8866 | 82 #define GL_QUERY_RESULT_EXT 0x8866 |
83 #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 | 83 #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 |
84 | 84 |
85 // GL_CHROMIUM_command_buffer_query | 85 // GL_CHROMIUM_command_buffer_query |
86 #define GL_COMMANDS_ISSUED_CHROMIUM 0x84F2 | 86 #define GL_COMMANDS_ISSUED_CHROMIUM 0x84F2 |
87 | 87 |
88 // GL_OES_texure_3D | 88 // GL_OES_texure_3D |
89 #define GL_SAMPLER_3D_OES 0x8B5F | 89 #define GL_SAMPLER_3D_OES 0x8B5F |
90 | 90 |
| 91 // GL_CHROMIUM_pixel_transfer_buffer_object |
| 92 #define GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM 0x88EB |
| 93 #define GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM 0x88EC |
| 94 #define GL_PIXEL_PACK_TRANSFER_BUFFER_BINDING_CHROMIUM 0x88ED |
| 95 #define GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM 0x88EF |
| 96 |
91 #define GL_GLEXT_PROTOTYPES 1 | 97 #define GL_GLEXT_PROTOTYPES 1 |
92 | 98 |
93 // Define this for extra GL error debugging (slower). | 99 // Define this for extra GL error debugging (slower). |
94 // #define GL_ERROR_DEBUGGING | 100 // #define GL_ERROR_DEBUGGING |
95 #ifdef GL_ERROR_DEBUGGING | 101 #ifdef GL_ERROR_DEBUGGING |
96 #define CHECK_GL_ERROR() do { \ | 102 #define CHECK_GL_ERROR() do { \ |
97 GLenum gl_error = glGetError(); \ | 103 GLenum gl_error = glGetError(); \ |
98 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ | 104 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ |
99 } while (0) | 105 } while (0) |
100 #else // GL_ERROR_DEBUGGING | 106 #else // GL_ERROR_DEBUGGING |
101 #define CHECK_GL_ERROR() void(0) | 107 #define CHECK_GL_ERROR() void(0) |
102 #endif // GL_ERROR_DEBUGGING | 108 #endif // GL_ERROR_DEBUGGING |
103 | 109 |
104 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 110 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
OLD | NEW |