OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrGLUtil_DEFINED | 8 #ifndef GrGLUtil_DEFINED |
9 #define GrGLUtil_DEFINED | 9 #define GrGLUtil_DEFINED |
10 | 10 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 /** | 82 /** |
83 * Helpers for glGetError() | 83 * Helpers for glGetError() |
84 */ | 84 */ |
85 | 85 |
86 void GrGLCheckErr(const GrGLInterface* gl, | 86 void GrGLCheckErr(const GrGLInterface* gl, |
87 const char* location, | 87 const char* location, |
88 const char* call); | 88 const char* call); |
89 | 89 |
90 void GrGLClearErr(const GrGLInterface* gl); | 90 void GrGLClearErr(const GrGLInterface* gl); |
91 | 91 |
| 92 int getMesaGLVersion(const int mesaMajorVersion, int* major, int* minor); |
| 93 |
92 //////////////////////////////////////////////////////////////////////////////// | 94 //////////////////////////////////////////////////////////////////////////////// |
93 | 95 |
94 /** | 96 /** |
95 * Macros for using GrGLInterface to make GL calls | 97 * Macros for using GrGLInterface to make GL calls |
96 */ | 98 */ |
97 | 99 |
98 // internal macro to conditionally call glGetError based on compile-time and | 100 // internal macro to conditionally call glGetError based on compile-time and |
99 // run-time flags. | 101 // run-time flags. |
100 #if GR_GL_CHECK_ERROR | 102 #if GR_GL_CHECK_ERROR |
101 extern bool gCheckErrorGL; | 103 extern bool gCheckErrorGL; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 do { \ | 154 do { \ |
153 GR_GL_CALLBACK_IMPL(IFACE); \ | 155 GR_GL_CALLBACK_IMPL(IFACE); \ |
154 (RET) = (IFACE)->f##X; \ | 156 (RET) = (IFACE)->f##X; \ |
155 GR_GL_LOG_CALLS_IMPL(X); \ | 157 GR_GL_LOG_CALLS_IMPL(X); \ |
156 } while (false) | 158 } while (false) |
157 | 159 |
158 // call glGetError without doing a redundant error check or logging. | 160 // call glGetError without doing a redundant error check or logging. |
159 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fGetError() | 161 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fGetError() |
160 | 162 |
161 #endif | 163 #endif |
OLD | NEW |