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 // These functions emulate GLES2 over command buffers. | 5 // These functions emulate GLES2 over command buffers. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_ | 7 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_ |
8 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_ | 8 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_ |
9 | 9 |
10 #include "gpu/command_buffer/client/gles2_c_lib_export.h" | 10 #include "gpu/command_buffer/client/gles2_c_lib_export.h" |
11 #include "gpu/command_buffer/client/gles2_interface.h" | 11 #include "gpu/command_buffer/client/gles2_interface.h" |
12 | 12 |
13 namespace gles2 { | 13 namespace gles2 { |
14 | 14 |
15 typedef void (*GLES2FunctionPointer)(void); | 15 typedef void(GL_APIENTRY* GLES2FunctionPointer)(void); |
16 | 16 |
17 struct NameToFunc { | 17 struct NameToFunc { |
18 const char* name; | 18 const char* name; |
19 gles2::GLES2FunctionPointer func; | 19 gles2::GLES2FunctionPointer func; |
20 }; | 20 }; |
21 | 21 |
22 // Initialize the GLES2 library. | 22 // Initialize the GLES2 library. |
23 GLES2_C_LIB_EXPORT void Initialize(); | 23 GLES2_C_LIB_EXPORT void Initialize(); |
24 | 24 |
25 // Terminate the GLES2 library. | 25 // Terminate the GLES2 library. |
26 GLES2_C_LIB_EXPORT void Terminate(); | 26 GLES2_C_LIB_EXPORT void Terminate(); |
27 | 27 |
28 // Get the current GL context. | 28 // Get the current GL context. |
29 GLES2_C_LIB_EXPORT gpu::gles2::GLES2Interface* GetGLContext(); | 29 GLES2_C_LIB_EXPORT gpu::gles2::GLES2Interface* GetGLContext(); |
30 | 30 |
31 // Set the current GL context. | 31 // Set the current GL context. |
32 GLES2_C_LIB_EXPORT void SetGLContext(gpu::gles2::GLES2Interface* impl); | 32 GLES2_C_LIB_EXPORT void SetGLContext(gpu::gles2::GLES2Interface* impl); |
33 | 33 |
34 GLES2_C_LIB_EXPORT GLES2FunctionPointer GetGLFunctionPointer(const char* name); | 34 GLES2_C_LIB_EXPORT GLES2FunctionPointer GetGLFunctionPointer(const char* name); |
35 | 35 |
36 } // namespace gles2 | 36 } // namespace gles2 |
37 | 37 |
38 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_ | 38 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_ |
OLD | NEW |