OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_GL_GL_IMPLEMENTATION_H_ | 5 #ifndef UI_GL_GL_IMPLEMENTATION_H_ |
6 #define UI_GL_GL_IMPLEMENTATION_H_ | 6 #define UI_GL_GL_IMPLEMENTATION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... | |
35 | 35 |
36 void GetAllowedGLImplementations(std::vector<GLImplementation>* impls); | 36 void GetAllowedGLImplementations(std::vector<GLImplementation>* impls); |
37 | 37 |
38 #if defined(OS_WIN) | 38 #if defined(OS_WIN) |
39 typedef void* (WINAPI *GLGetProcAddressProc)(const char* name); | 39 typedef void* (WINAPI *GLGetProcAddressProc)(const char* name); |
40 #else | 40 #else |
41 typedef void* (*GLGetProcAddressProc)(const char* name); | 41 typedef void* (*GLGetProcAddressProc)(const char* name); |
42 #endif | 42 #endif |
43 | 43 |
44 // Initialize a particular GL implementation. | 44 // Initialize a particular GL implementation. |
45 GL_EXPORT bool InitializeGLBindings(GLImplementation implementation); | 45 GL_EXPORT bool InitializeStaticGLBindings(GLImplementation implementation); |
46 | 46 |
47 // Initialize extension function bindings for a GL implementation. | 47 // Initialize function bindings that depend on the context for a GL |
48 GL_EXPORT bool InitializeGLExtensionBindings(GLImplementation implementation, | 48 // implementation. |
49 GL_EXPORT bool InitializeDynamicGLBindings(GLImplementation implementation, | |
49 GLContext* context); | 50 GLContext* context); |
50 | 51 |
51 // Initialize Debug logging wrappers for GL bindings. | 52 // Initialize Debug logging wrappers for GL bindings. |
52 void InitializeDebugGLBindings(); | 53 void InitializeDebugGLBindings(); |
53 | 54 |
54 GL_EXPORT void ClearGLBindings(); | 55 GL_EXPORT void ClearGLBindings(); |
55 | 56 |
56 // Set the current GL implementation. | 57 // Set the current GL implementation. |
57 GL_EXPORT void SetGLImplementation(GLImplementation implementation); | 58 GL_EXPORT void SetGLImplementation(GLImplementation implementation); |
58 | 59 |
(...skipping 12 matching lines...) Expand all Loading... | |
71 | 72 |
72 // Add a native library to those searched for GL entry points. | 73 // Add a native library to those searched for GL entry points. |
73 void AddGLNativeLibrary(base::NativeLibrary library); | 74 void AddGLNativeLibrary(base::NativeLibrary library); |
74 | 75 |
75 // Unloads all native libraries. | 76 // Unloads all native libraries. |
76 void UnloadGLNativeLibraries(); | 77 void UnloadGLNativeLibraries(); |
77 | 78 |
78 // Set an additional function that will be called to find GL entry points. | 79 // Set an additional function that will be called to find GL entry points. |
79 void SetGLGetProcAddressProc(GLGetProcAddressProc proc); | 80 void SetGLGetProcAddressProc(GLGetProcAddressProc proc); |
80 | 81 |
81 // Find a core (non-extension) entry point in the current GL implementation. On | 82 // Find an entry point in the current GL implementation. Note that the function |
82 // EGL based implementations core entry points will not be queried through | 83 // may return garbage if an unsupported function is queried. This is the case at |
83 // GLGetProcAddressProc. | 84 // least with spec-compliant eglGetProcAddress and glxGetProcAddress and when |
84 void* GetGLCoreProcAddress(const char* name); | 85 // querying functions from the EGL library supplied by Android, which contains |
no sievers
2013/12/05 20:51:57
Well, it's not really garbage it returns on Androi
oetuaho
2013/12/09 17:17:07
Yeah, I'll re-word the comment to make this clear.
| |
85 | 86 // stubs for unsupported functions known to that Android version. |
86 // Find an entry point in the current GL implementation. | |
87 void* GetGLProcAddress(const char* name); | 87 void* GetGLProcAddress(const char* name); |
88 | 88 |
89 // Return information about the GL window system binding implementation (e.g., | 89 // Return information about the GL window system binding implementation (e.g., |
90 // EGL, GLX, WGL). Returns true if the information was retrieved successfully. | 90 // EGL, GLX, WGL). Returns true if the information was retrieved successfully. |
91 GL_EXPORT bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info); | 91 GL_EXPORT bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info); |
92 | 92 |
93 } // namespace gfx | 93 } // namespace gfx |
94 | 94 |
95 #endif // UI_GL_GL_IMPLEMENTATION_H_ | 95 #endif // UI_GL_GL_IMPLEMENTATION_H_ |
OLD | NEW |