OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrGLInterface_DEFINED | 8 #ifndef GrGLInterface_DEFINED |
9 #define GrGLInterface_DEFINED | 9 #define GrGLInterface_DEFINED |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 * | 23 * |
24 * The default interface is returned by GrGLDefaultInterface. This function's | 24 * The default interface is returned by GrGLDefaultInterface. This function's |
25 * implementation is platform-specific. Several have been provided, along with | 25 * implementation is platform-specific. Several have been provided, along with |
26 * an implementation that simply returns NULL. | 26 * an implementation that simply returns NULL. |
27 * | 27 * |
28 * By defining GR_GL_PER_GL_CALL_IFACE_CALLBACK to 1 the client can specify a | 28 * By defining GR_GL_PER_GL_CALL_IFACE_CALLBACK to 1 the client can specify a |
29 * callback function that will be called prior to each GL function call. See | 29 * callback function that will be called prior to each GL function call. See |
30 * comments in GrGLConfig.h | 30 * comments in GrGLConfig.h |
31 */ | 31 */ |
32 | 32 |
| 33 typedef void(*GrGLFuncPtr)(); |
| 34 |
33 struct GrGLInterface; | 35 struct GrGLInterface; |
34 | 36 |
35 const GrGLInterface* GrGLDefaultInterface(); | 37 const GrGLInterface* GrGLDefaultInterface(); |
36 | 38 |
37 /** | 39 /** |
38 * Creates a GrGLInterface for a "native" GL context (e.g. WGL on windows, | 40 * Creates a GrGLInterface for a "native" GL context (e.g. WGL on windows, |
39 * GLX on linux, AGL on Mac). The interface is only valid for the GL context | 41 * GLX on linux, AGL on Mac). The interface is only valid for the GL context |
40 * that is current when the interface is created. | 42 * that is current when the interface is created. |
41 */ | 43 */ |
42 const GrGLInterface* GrGLCreateNativeInterface(); | 44 const GrGLInterface* GrGLCreateNativeInterface(); |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 #if GR_GL_PER_GL_FUNC_CALLBACK | 499 #if GR_GL_PER_GL_FUNC_CALLBACK |
498 GrGLInterfaceCallbackProc fCallback; | 500 GrGLInterfaceCallbackProc fCallback; |
499 GrGLInterfaceCallbackData fCallbackData; | 501 GrGLInterfaceCallbackData fCallbackData; |
500 #endif | 502 #endif |
501 | 503 |
502 // This exists for internal testing. | 504 // This exists for internal testing. |
503 virtual void abandon() const {} | 505 virtual void abandon() const {} |
504 }; | 506 }; |
505 | 507 |
506 #endif | 508 #endif |
OLD | NEW |