OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // OpenGL ES 2.0 extensions for PPAPI. | 5 // OpenGL ES 2.0 extensions for PPAPI. |
6 | 6 |
7 #ifndef PPAPI_LIB_GL_GLES2_GL2EXT_PPAPI_H_ | 7 #ifndef PPAPI_LIB_GL_GLES2_GL2EXT_PPAPI_H_ |
8 #define PPAPI_LIB_GL_GLES2_GL2EXT_PPAPI_H_ | 8 #define PPAPI_LIB_GL_GLES2_GL2EXT_PPAPI_H_ |
9 | 9 |
10 #include <GLES2/gl2platform.h> | 10 #include <GLES2/gl2platform.h> |
11 | 11 |
12 #include "ppapi/c/pp_resource.h" | 12 #include "ppapi/c/pp_resource.h" |
13 #include "ppapi/c/ppb.h" | 13 #include "ppapi/c/ppb.h" |
14 #include "ppapi/c/ppb_opengles.h" | 14 #include "ppapi/c/dev/ppb_opengles_dev.h" |
15 | 15 |
16 #ifdef __cplusplus | 16 #ifdef __cplusplus |
17 extern "C" { | 17 extern "C" { |
18 #endif // __cplusplus | 18 #endif // __cplusplus |
19 | 19 |
20 // Initializes OpenGL ES 2.0 library. | 20 // Initializes OpenGL ES 2.0 library. |
21 // Must be called once before making any gl calls. | 21 // Must be called once before making any gl calls. |
22 // GL_FALSE is returned on failure, GL_TRUE otherwise. | 22 // GL_FALSE is returned on failure, GL_TRUE otherwise. |
23 GL_APICALL GLboolean GL_APIENTRY glInitializePPAPI( | 23 GL_APICALL GLboolean GL_APIENTRY glInitializePPAPI( |
24 PPB_GetInterface get_browser_interface); | 24 PPB_GetInterface get_browser_interface); |
25 | 25 |
26 // Terminates OpenGL ES 2.0 library. | 26 // Terminates OpenGL ES 2.0 library. |
27 // GL_FALSE is returned on failure, GL_TRUE otherwise. | 27 // GL_FALSE is returned on failure, GL_TRUE otherwise. |
28 GL_APICALL GLboolean GL_APIENTRY glTerminatePPAPI(); | 28 GL_APICALL GLboolean GL_APIENTRY glTerminatePPAPI(); |
29 | 29 |
30 // Sets context to be used for rendering in the current thread. | 30 // Sets context to be used for rendering in the current thread. |
31 GL_APICALL void GL_APIENTRY glSetCurrentContextPPAPI(PP_Resource context); | 31 GL_APICALL void GL_APIENTRY glSetCurrentContextPPAPI(PP_Resource context); |
32 | 32 |
33 // Gets context being used for rendering in the current thread. | 33 // Gets context being used for rendering in the current thread. |
34 // Returns NULL if a context has not been set yet. | 34 // Returns NULL if a context has not been set yet. |
35 GL_APICALL PP_Resource GL_APIENTRY glGetCurrentContextPPAPI(); | 35 GL_APICALL PP_Resource GL_APIENTRY glGetCurrentContextPPAPI(); |
36 | 36 |
37 // Returns OpenGL ES 2.0 interface. | 37 // Returns OpenGL ES 2.0 interface. |
38 GL_APICALL const struct PPB_OpenGLES2* GL_APIENTRY glGetInterfacePPAPI(); | 38 GL_APICALL const struct PPB_OpenGLES2_Dev* GL_APIENTRY glGetInterfacePPAPI(); |
39 | 39 |
40 #ifdef __cplusplus | 40 #ifdef __cplusplus |
41 } | 41 } |
42 #endif // __cplusplus | 42 #endif // __cplusplus |
43 | 43 |
44 #endif // PPAPI_LIB_GL_GLES2_GL2EXT_PPAPI_H_ | 44 #endif // PPAPI_LIB_GL_GLES2_GL2EXT_PPAPI_H_ |
45 | 45 |
OLD | NEW |