OLD | NEW |
1 // Copyright (c) 2011 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 |
(...skipping 13 matching lines...) Expand all Loading... |
24 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD | 24 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD |
25 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB | 25 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB |
26 #define GL_MAX_VARYING_VECTORS 0x8DFC | 26 #define GL_MAX_VARYING_VECTORS 0x8DFC |
27 #define GL_SHADER_BINARY_FORMATS 0x8DF8 | 27 #define GL_SHADER_BINARY_FORMATS 0x8DF8 |
28 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 | 28 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 |
29 #define GL_SHADER_COMPILER 0x8DFA | 29 #define GL_SHADER_COMPILER 0x8DFA |
30 #define GL_RGB565 0x8D62 | 30 #define GL_RGB565 0x8D62 |
31 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B | 31 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B |
32 #define GL_RGB8_OES 0x8051 | 32 #define GL_RGB8_OES 0x8051 |
33 #define GL_RGBA8_OES 0x8058 | 33 #define GL_RGBA8_OES 0x8058 |
| 34 #define GL_HALF_FLOAT_OES 0x8D61 |
34 | 35 |
35 // GL_OES_EGL_image_external | 36 // GL_OES_EGL_image_external |
36 #define GL_TEXTURE_EXTERNAL_OES 0x8D65 | 37 #define GL_TEXTURE_EXTERNAL_OES 0x8D65 |
37 #define GL_SAMPLER_EXTERNAL_OES 0x8D66 | 38 #define GL_SAMPLER_EXTERNAL_OES 0x8D66 |
38 #define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 | 39 #define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 |
39 #define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 | 40 #define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 |
40 | 41 |
41 #define GL_GLEXT_PROTOTYPES 1 | 42 #define GL_GLEXT_PROTOTYPES 1 |
42 | 43 |
43 // Define this for extra GL error debugging (slower). | 44 // Define this for extra GL error debugging (slower). |
44 // #define GL_ERROR_DEBUGGING | 45 // #define GL_ERROR_DEBUGGING |
45 #ifdef GL_ERROR_DEBUGGING | 46 #ifdef GL_ERROR_DEBUGGING |
46 #define CHECK_GL_ERROR() do { \ | 47 #define CHECK_GL_ERROR() do { \ |
47 GLenum gl_error = glGetError(); \ | 48 GLenum gl_error = glGetError(); \ |
48 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ | 49 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ |
49 } while (0) | 50 } while (0) |
50 #else // GL_ERROR_DEBUGGING | 51 #else // GL_ERROR_DEBUGGING |
51 #define CHECK_GL_ERROR() void(0) | 52 #define CHECK_GL_ERROR() void(0) |
52 #endif // GL_ERROR_DEBUGGING | 53 #endif // GL_ERROR_DEBUGGING |
53 | 54 |
54 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ | 55 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_ |
OLD | NEW |