OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "app/gfx/gl/gl_bindings.h" | 12 #include "ui/gfx/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 16 matching lines...) Expand all Loading... |
39 #ifdef GL_ERROR_DEBUGGING | 39 #ifdef GL_ERROR_DEBUGGING |
40 #define CHECK_GL_ERROR() do { \ | 40 #define CHECK_GL_ERROR() do { \ |
41 GLenum gl_error = glGetError(); \ | 41 GLenum gl_error = glGetError(); \ |
42 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ | 42 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ |
43 } while (0) | 43 } while (0) |
44 #else // GL_ERROR_DEBUGGING | 44 #else // GL_ERROR_DEBUGGING |
45 #define CHECK_GL_ERROR() void(0) | 45 #define CHECK_GL_ERROR() void(0) |
46 #endif // GL_ERROR_DEBUGGING | 46 #endif // GL_ERROR_DEBUGGING |
47 | 47 |
48 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 48 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
OLD | NEW |