| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // GL_EXT_occlusion_query_boolean | 79 // GL_EXT_occlusion_query_boolean |
| 80 #define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F | 80 #define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F |
| 81 #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A | 81 #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A |
| 82 #define GL_CURRENT_QUERY_EXT 0x8865 | 82 #define GL_CURRENT_QUERY_EXT 0x8865 |
| 83 #define GL_QUERY_RESULT_EXT 0x8866 | 83 #define GL_QUERY_RESULT_EXT 0x8866 |
| 84 #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 | 84 #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 |
| 85 | 85 |
| 86 // GL_CHROMIUM_command_buffer_query | 86 // GL_CHROMIUM_command_buffer_query |
| 87 #define GL_COMMANDS_ISSUED_CHROMIUM 0x84F2 | 87 #define GL_COMMANDS_ISSUED_CHROMIUM 0x84F2 |
| 88 | 88 |
| 89 /* GL_CHROMIUM_get_error_query */ |
| 90 #define GL_GET_ERROR_QUERY_CHROMIUM 0x84F3 |
| 91 |
| 89 // GL_OES_texure_3D | 92 // GL_OES_texure_3D |
| 90 #define GL_SAMPLER_3D_OES 0x8B5F | 93 #define GL_SAMPLER_3D_OES 0x8B5F |
| 91 | 94 |
| 92 // GL_OES_depth24 | 95 // GL_OES_depth24 |
| 93 #define GL_DEPTH_COMPONENT24_OES 0x81A6 | 96 #define GL_DEPTH_COMPONENT24_OES 0x81A6 |
| 94 | 97 |
| 95 // GL_OES_depth32 | 98 // GL_OES_depth32 |
| 96 #define GL_DEPTH_COMPONENT32_OES 0x81A7 | 99 #define GL_DEPTH_COMPONENT32_OES 0x81A7 |
| 97 | 100 |
| 98 // GL_OES_packed_depth_stencil | 101 // GL_OES_packed_depth_stencil |
| 99 #define GL_DEPTH24_STENCIL8_OES 0x88F0 | 102 #define GL_DEPTH24_STENCIL8_OES 0x88F0 |
| 100 | 103 |
| 101 #define GL_GLEXT_PROTOTYPES 1 | 104 #define GL_GLEXT_PROTOTYPES 1 |
| 102 | 105 |
| 103 // Define this for extra GL error debugging (slower). | 106 // Define this for extra GL error debugging (slower). |
| 104 // #define GL_ERROR_DEBUGGING | 107 // #define GL_ERROR_DEBUGGING |
| 105 #ifdef GL_ERROR_DEBUGGING | 108 #ifdef GL_ERROR_DEBUGGING |
| 106 #define CHECK_GL_ERROR() do { \ | 109 #define CHECK_GL_ERROR() do { \ |
| 107 GLenum gl_error = glGetError(); \ | 110 GLenum gl_error = glGetError(); \ |
| 108 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ | 111 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ |
| 109 } while (0) | 112 } while (0) |
| 110 #else // GL_ERROR_DEBUGGING | 113 #else // GL_ERROR_DEBUGGING |
| 111 #define CHECK_GL_ERROR() void(0) | 114 #define CHECK_GL_ERROR() void(0) |
| 112 #endif // GL_ERROR_DEBUGGING | 115 #endif // GL_ERROR_DEBUGGING |
| 113 | 116 |
| 114 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 117 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
| OLD | NEW |