Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: ppapi/lib/gl/gles2/gl2ext_ppapi.h

Issue 5927002: Moved the logic of maintaining the current context to gles2 helper library. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/cpp/dev/graphics_3d_dev.cc ('k') | ppapi/lib/gl/gles2/gl2ext_ppapi.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 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_module.h"
13 #include "ppapi/c/pp_resource.h" 12 #include "ppapi/c/pp_resource.h"
14 #include "ppapi/c/ppb.h" 13 #include "ppapi/c/ppb.h"
15 #include "ppapi/c/dev/ppb_opengles_dev.h" 14 #include "ppapi/c/dev/ppb_opengles_dev.h"
16 15
17 #ifdef __cplusplus 16 #ifdef __cplusplus
18 extern "C" { 17 extern "C" {
19 #endif // __cplusplus 18 #endif // __cplusplus
20 19
21 // Initializes OpenGL ES 2.0 library. 20 // Initializes OpenGL ES 2.0 library.
22 // Must be called once before making any gl calls. 21 // Must be called once before making any gl calls.
23 // GL_FALSE is returned on failure, GL_TRUE otherwise. 22 // GL_FALSE is returned on failure, GL_TRUE otherwise.
24 GL_APICALL int GL_APIENTRY glInitializePPAPI( 23 GL_APICALL GLboolean GL_APIENTRY glInitializePPAPI(
25 PP_Module module,
26 PPB_GetInterface get_browser_interface); 24 PPB_GetInterface get_browser_interface);
27 25
28 // Terminates OpenGL ES 2.0 library. 26 // Terminates OpenGL ES 2.0 library.
29 // GL_FALSE is returned on failure, GL_TRUE otherwise. 27 // GL_FALSE is returned on failure, GL_TRUE otherwise.
30 GL_APICALL int GL_APIENTRY glTerminatePPAPI(); 28 GL_APICALL GLboolean GL_APIENTRY glTerminatePPAPI();
31 29
32 // Sets context to be used for rendering in the current thread. 30 // Sets context to be used for rendering in the current thread.
33 GL_APICALL void GL_APIENTRY glSetCurrentContextPPAPI(PP_Resource context); 31 GL_APICALL void GL_APIENTRY glSetCurrentContextPPAPI(PP_Resource context);
34 32
35 // Gets context being used for rendering in the current thread. 33 // Gets context being used for rendering in the current thread.
36 // Returns NULL if a context has not been set yet. 34 // Returns NULL if a context has not been set yet.
37 GL_APICALL PP_Resource GL_APIENTRY glGetCurrentContextPPAPI(); 35 GL_APICALL PP_Resource GL_APIENTRY glGetCurrentContextPPAPI();
38 36
39 // Returns OpenGL ES 2.0 interface. 37 // Returns OpenGL ES 2.0 interface.
40 GL_APICALL const struct PPB_OpenGLES_Dev* GL_APIENTRY glGetInterfacePPAPI(); 38 GL_APICALL const struct PPB_OpenGLES2_Dev* GL_APIENTRY glGetInterfacePPAPI();
41 39
42 #ifdef __cplusplus 40 #ifdef __cplusplus
43 } 41 }
44 #endif // __cplusplus 42 #endif // __cplusplus
45 43
46 #endif // PPAPI_LIB_GL_GLES2_GL2EXT_PPAPI_H_ 44 #endif // PPAPI_LIB_GL_GLES2_GL2EXT_PPAPI_H_
47 45
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/graphics_3d_dev.cc ('k') | ppapi/lib/gl/gles2/gl2ext_ppapi.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698