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

Side by Side Diff: ppapi/c/ppb_graphics_3d.h

Issue 7737013: Move PPAPI graphics3d and opengles interfaces out of Dev. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 months 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/c/pp_graphics_3d.h ('k') | ppapi/c/ppb_opengles.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2011 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 PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ 5 #ifndef PPAPI_C_PPB_GRAPHICS_3D_H_
6 #define PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ 6 #define PPAPI_C_PPB_GRAPHICS_3D_H_
7 7
8 #include "ppapi/c/dev/pp_graphics_3d_dev.h" 8 #include "ppapi/c/pp_graphics_3d.h"
9 9
10 #include "ppapi/c/pp_bool.h" 10 #include "ppapi/c/pp_bool.h"
11 #include "ppapi/c/pp_instance.h" 11 #include "ppapi/c/pp_instance.h"
12 #include "ppapi/c/pp_resource.h" 12 #include "ppapi/c/pp_resource.h"
13 13
14 // Example usage from plugin code: 14 // Example usage from plugin code:
15 // 15 //
16 // // Setup. 16 // // Setup.
17 // PP_Resource context; 17 // PP_Resource context;
18 // int32_t attribs[] = {PP_GRAPHICS3DATTRIB_WIDTH, 800, 18 // int32_t attribs[] = {PP_GRAPHICS3DATTRIB_WIDTH, 800,
19 // PP_GRAPHICS3DATTRIB_HEIGHT, 800, 19 // PP_GRAPHICS3DATTRIB_HEIGHT, 800,
20 // PP_GRAPHICS3DATTRIB_NONE}; 20 // PP_GRAPHICS3DATTRIB_NONE};
21 // context = g3d->Create(instance, attribs, &context); 21 // context = g3d->Create(instance, attribs, &context);
22 // inst->BindGraphics(instance, context); 22 // inst->BindGraphics(instance, context);
23 // 23 //
24 // // Present one frame. 24 // // Present one frame.
25 // gles2->Clear(context, GL_COLOR_BUFFER); 25 // gles2->Clear(context, GL_COLOR_BUFFER);
26 // g3d->SwapBuffers(context); 26 // g3d->SwapBuffers(context);
27 // 27 //
28 // // Shutdown. 28 // // Shutdown.
29 // core->ReleaseResource(context); 29 // core->ReleaseResource(context);
30 30
31 #define PPB_GRAPHICS_3D_DEV_INTERFACE_0_9 "PPB_Graphics3D(Dev);0.9" 31 #define PPB_GRAPHICS_3D_INTERFACE_1_0 "PPB_Graphics3D;1.0"
32 #define PPB_GRAPHICS_3D_DEV_INTERFACE PPB_GRAPHICS_3D_DEV_INTERFACE_0_9 32 #define PPB_GRAPHICS_3D_INTERFACE PPB_GRAPHICS_3D_INTERFACE_1_0
33 33
34 struct PPB_Graphics3D_Dev { 34 struct PPB_Graphics3D {
35 // Retrieves the maximum supported value for the given attribute. 35 // Retrieves the maximum supported value for the given attribute.
36 // 36 //
37 // This function may be used to check if a particular attribute value is 37 // This function may be used to check if a particular attribute value is
38 // supported before attempting to create a context. 38 // supported before attempting to create a context.
39 // Attributes that can be queried for include: 39 // Attributes that can be queried for include:
40 // - PP_GRAPHICS3DATTRIB_ALPHA_SIZE 40 // - PP_GRAPHICS3DATTRIB_ALPHA_SIZE
41 // - PP_GRAPHICS3DATTRIB_BLUE_SIZE 41 // - PP_GRAPHICS3DATTRIB_BLUE_SIZE
42 // - PP_GRAPHICS3DATTRIB_GREEN_SIZE 42 // - PP_GRAPHICS3DATTRIB_GREEN_SIZE
43 // - PP_GRAPHICS3DATTRIB_RED_SIZE 43 // - PP_GRAPHICS3DATTRIB_RED_SIZE
44 // - PP_GRAPHICS3DATTRIB_DEPTH_SIZE 44 // - PP_GRAPHICS3DATTRIB_DEPTH_SIZE
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // - PP_ERROR_CONTEXT_LOST 194 // - PP_ERROR_CONTEXT_LOST
195 // Note that the same error code may also be obtained by calling GetError. 195 // Note that the same error code may also be obtained by calling GetError.
196 // 196 //
197 // On failure SwapBuffers may return the following error codes: 197 // On failure SwapBuffers may return the following error codes:
198 // - PP_ERROR_BADRESOURCE if context is invalid. 198 // - PP_ERROR_BADRESOURCE if context is invalid.
199 // - PP_ERROR_BADARGUMENT if callback is invalid. 199 // - PP_ERROR_BADARGUMENT if callback is invalid.
200 int32_t (*SwapBuffers)(PP_Resource context, 200 int32_t (*SwapBuffers)(PP_Resource context,
201 struct PP_CompletionCallback callback); 201 struct PP_CompletionCallback callback);
202 }; 202 };
203 203
204 #endif /* PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ */ 204 #endif /* PPAPI_C_PPB_GRAPHICS_3D_H_ */
OLDNEW
« no previous file with comments | « ppapi/c/pp_graphics_3d.h ('k') | ppapi/c/ppb_opengles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698