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 |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 #include "ui/gfx/gl/gl_bindings.h" | 12 #include "ui/gl/gl_bindings.h" |
13 | 13 |
14 // GLES2 defines not part of Desktop GL | 14 // GLES2 defines not part of Desktop GL |
15 // Shader Precision-Specified Types | 15 // Shader Precision-Specified Types |
16 #define GL_LOW_FLOAT 0x8DF0 | 16 #define GL_LOW_FLOAT 0x8DF0 |
17 #define GL_MEDIUM_FLOAT 0x8DF1 | 17 #define GL_MEDIUM_FLOAT 0x8DF1 |
18 #define GL_HIGH_FLOAT 0x8DF2 | 18 #define GL_HIGH_FLOAT 0x8DF2 |
19 #define GL_LOW_INT 0x8DF3 | 19 #define GL_LOW_INT 0x8DF3 |
20 #define GL_MEDIUM_INT 0x8DF4 | 20 #define GL_MEDIUM_INT 0x8DF4 |
21 #define GL_HIGH_INT 0x8DF5 | 21 #define GL_HIGH_INT 0x8DF5 |
22 #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A | 22 #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 #ifdef GL_ERROR_DEBUGGING | 95 #ifdef GL_ERROR_DEBUGGING |
96 #define CHECK_GL_ERROR() do { \ | 96 #define CHECK_GL_ERROR() do { \ |
97 GLenum gl_error = glGetError(); \ | 97 GLenum gl_error = glGetError(); \ |
98 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ | 98 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ |
99 } while (0) | 99 } while (0) |
100 #else // GL_ERROR_DEBUGGING | 100 #else // GL_ERROR_DEBUGGING |
101 #define CHECK_GL_ERROR() void(0) | 101 #define CHECK_GL_ERROR() void(0) |
102 #endif // GL_ERROR_DEBUGGING | 102 #endif // GL_ERROR_DEBUGGING |
103 | 103 |
104 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 104 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
OLD | NEW |