| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Note: This header should be compilable as C. | 5 // Note: This header should be compilable as C. |
| 6 | 6 |
| 7 #ifndef MOJO_PUBLIC_C_GPU_MGL_MGL_H_ | 7 #ifndef MOJO_PUBLIC_C_INCLUDE_MGL_MGL_H_ |
| 8 #define MOJO_PUBLIC_C_GPU_MGL_MGL_H_ | 8 #define MOJO_PUBLIC_C_INCLUDE_MGL_MGL_H_ |
| 9 | 9 |
| 10 #include <MGL/mgl_types.h> |
| 11 #include <mojo/macros.h> |
| 10 #include <mojo/system/handle.h> | 12 #include <mojo/system/handle.h> |
| 11 #include <stdint.h> | 13 #include <stdint.h> |
| 12 | 14 |
| 13 #include "mojo/public/c/gpu/MGL/mgl_types.h" | 15 MOJO_BEGIN_EXTERN_C |
| 14 | |
| 15 #ifdef __cplusplus | |
| 16 extern "C" { | |
| 17 #endif | |
| 18 | 16 |
| 19 typedef uint32_t MGLOpenGLAPIVersion; | 17 typedef uint32_t MGLOpenGLAPIVersion; |
| 20 | 18 |
| 21 // OpenGL ES 2.0 | 19 // OpenGL ES 2.0 |
| 22 #define MGL_API_VERSION_GLES2 ((MGLOpenGLAPIVersion)1) | 20 #define MGL_API_VERSION_GLES2 ((MGLOpenGLAPIVersion)1) |
| 23 // OpenGL ES 3.0 | 21 // OpenGL ES 3.0 |
| 24 #define MGL_API_VERSION_GLES3 ((MGLOpenGLAPIVersion)2) | 22 #define MGL_API_VERSION_GLES3 ((MGLOpenGLAPIVersion)2) |
| 25 // OpenGL ES 3.1 | 23 // OpenGL ES 3.1 |
| 26 #define MGL_API_VERSION_GLES31 ((MGLOpenGLAPIVersion)3) | 24 #define MGL_API_VERSION_GLES31 ((MGLOpenGLAPIVersion)3) |
| 27 | 25 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 55 // if there is none. | 53 // if there is none. |
| 56 MGLContext MGLGetCurrentContext(void); | 54 MGLContext MGLGetCurrentContext(void); |
| 57 | 55 |
| 58 // Returns GL function usable in any context that advertise the corresponding | 56 // Returns GL function usable in any context that advertise the corresponding |
| 59 // extension in their GL_EXTENSIONS string, or null for functions that the | 57 // extension in their GL_EXTENSIONS string, or null for functions that the |
| 60 // implementation does not support. The implementation only advertises GL | 58 // implementation does not support. The implementation only advertises GL |
| 61 // functions. | 59 // functions. |
| 62 // |name| is the name of the GL function. | 60 // |name| is the name of the GL function. |
| 63 MGLMustCastToProperFunctionPointerType MGLGetProcAddress(const char* name); | 61 MGLMustCastToProperFunctionPointerType MGLGetProcAddress(const char* name); |
| 64 | 62 |
| 65 #ifdef __cplusplus | 63 MOJO_END_EXTERN_C |
| 66 } // extern "C" | |
| 67 #endif | |
| 68 | 64 |
| 69 #endif // MOJO_PUBLIC_C_GPU_MGL_MGL_H_ | 65 #endif // MOJO_PUBLIC_C_INCLUDE_MGL_MGL_H_ |
| OLD | NEW |