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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 //////////////////////////////////////////////////////////////////////////////// | 64 //////////////////////////////////////////////////////////////////////////////// |
65 | 65 |
66 /** | 66 /** |
67 * Helpers for glGetString() | 67 * Helpers for glGetString() |
68 */ | 68 */ |
69 | 69 |
70 // these variants assume caller already has a string from glGetString() | 70 // these variants assume caller already has a string from glGetString() |
71 GrGLVersion GrGLGetVersionFromString(const char* versionString); | 71 GrGLVersion GrGLGetVersionFromString(const char* versionString); |
72 GrGLBinding GrGLGetBindingInUseFromString(const char* versionString); | 72 GrGLBinding GrGLGetBindingInUseFromString(const char* versionString); |
73 GrGLSLVersion GrGLGetGLSLVersionFromString(const char* versionString); | 73 GrGLSLVersion GrGLGetGLSLVersionFromString(const char* versionString); |
| 74 bool GrGLIsMesaFromVersionString(const char* versionString); |
74 GrGLVendor GrGLGetVendorFromString(const char* vendorString); | 75 GrGLVendor GrGLGetVendorFromString(const char* vendorString); |
75 | 76 |
76 // these variants call glGetString() | 77 // these variants call glGetString() |
77 GrGLBinding GrGLGetBindingInUse(const GrGLInterface*); | 78 GrGLBinding GrGLGetBindingInUse(const GrGLInterface*); |
78 GrGLVersion GrGLGetVersion(const GrGLInterface*); | 79 GrGLVersion GrGLGetVersion(const GrGLInterface*); |
79 GrGLSLVersion GrGLGetGLSLVersion(const GrGLInterface*); | 80 GrGLSLVersion GrGLGetGLSLVersion(const GrGLInterface*); |
80 GrGLVendor GrGLGetVendor(const GrGLInterface*); | 81 GrGLVendor GrGLGetVendor(const GrGLInterface*); |
81 | 82 |
82 /** | 83 /** |
83 * Helpers for glGetError() | 84 * Helpers for glGetError() |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 do { \ | 153 do { \ |
153 GR_GL_CALLBACK_IMPL(IFACE); \ | 154 GR_GL_CALLBACK_IMPL(IFACE); \ |
154 (RET) = (IFACE)->f##X; \ | 155 (RET) = (IFACE)->f##X; \ |
155 GR_GL_LOG_CALLS_IMPL(X); \ | 156 GR_GL_LOG_CALLS_IMPL(X); \ |
156 } while (false) | 157 } while (false) |
157 | 158 |
158 // call glGetError without doing a redundant error check or logging. | 159 // call glGetError without doing a redundant error check or logging. |
159 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fGetError() | 160 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fGetError() |
160 | 161 |
161 #endif | 162 #endif |
OLD | NEW |