| 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 |
| 11 #include "gl/GrGLInterface.h" | 11 #include "gl/GrGLInterface.h" |
| 12 #include "GrGLDefines.h" | 12 #include "GrGLDefines.h" |
| 13 | 13 |
| 14 //////////////////////////////////////////////////////////////////////////////// | 14 //////////////////////////////////////////////////////////////////////////////// |
| 15 | 15 |
| 16 typedef uint32_t GrGLVersion; | 16 typedef uint32_t GrGLVersion; |
| 17 typedef uint32_t GrGLSLVersion; | 17 typedef uint32_t GrGLSLVersion; |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * This list is lazily updated as required. | 20 * This list is lazily updated as required. |
| 21 */ | 21 */ |
| 22 enum GrGLVendor { | 22 enum GrGLVendor { |
| 23 kARM_GrGLVendor, | 23 kARM_GrGLVendor, |
| 24 kImagination_GrGLVendor, | 24 kImagination_GrGLVendor, |
| 25 kIntel_GrGLVendor, | 25 kIntel_GrGLVendor, |
| 26 kQualcomm_GrGLVendor, |
| 26 | 27 |
| 27 kOther_GrGLVendor | 28 kOther_GrGLVendor |
| 28 }; | 29 }; |
| 29 | 30 |
| 30 #define GR_GL_VER(major, minor) ((static_cast<int>(major) << 16) | \ | 31 #define GR_GL_VER(major, minor) ((static_cast<int>(major) << 16) | \ |
| 31 static_cast<int>(minor)) | 32 static_cast<int>(minor)) |
| 32 #define GR_GLSL_VER(major, minor) ((static_cast<int>(major) << 16) | \ | 33 #define GR_GLSL_VER(major, minor) ((static_cast<int>(major) << 16) | \ |
| 33 static_cast<int>(minor)) | 34 static_cast<int>(minor)) |
| 34 | 35 |
| 35 //////////////////////////////////////////////////////////////////////////////// | 36 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 do { \ | 154 do { \ |
| 154 GR_GL_CALLBACK_IMPL(IFACE); \ | 155 GR_GL_CALLBACK_IMPL(IFACE); \ |
| 155 (RET) = (IFACE)->f##X; \ | 156 (RET) = (IFACE)->f##X; \ |
| 156 GR_GL_LOG_CALLS_IMPL(X); \ | 157 GR_GL_LOG_CALLS_IMPL(X); \ |
| 157 } while (false) | 158 } while (false) |
| 158 | 159 |
| 159 // call glGetError without doing a redundant error check or logging. | 160 // call glGetError without doing a redundant error check or logging. |
| 160 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fGetError() | 161 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fGetError() |
| 161 | 162 |
| 162 #endif | 163 #endif |
| OLD | NEW |