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

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

Issue 23494012: Fix ppb_graphics_3d example code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« ppapi/api/ppb_graphics_3d.idl ('K') | « ppapi/api/ppb_graphics_3d.idl ('k') | no next file » | 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) 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 5
6 /* From ppb_graphics_3d.idl modified Thu Mar 28 10:12:11 2013. */ 6 /* From ppb_graphics_3d.idl modified Thu Aug 29 23:20:36 2013. */
7 7
8 #ifndef PPAPI_C_PPB_GRAPHICS_3D_H_ 8 #ifndef PPAPI_C_PPB_GRAPHICS_3D_H_
9 #define PPAPI_C_PPB_GRAPHICS_3D_H_ 9 #define PPAPI_C_PPB_GRAPHICS_3D_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_completion_callback.h" 12 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h" 14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_resource.h" 15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h" 16 #include "ppapi/c/pp_stdint.h"
(...skipping 18 matching lines...) Expand all
35 /** 35 /**
36 * <code>PPB_Graphics3D</code> defines the interface for a 3D graphics context. 36 * <code>PPB_Graphics3D</code> defines the interface for a 3D graphics context.
37 * <strong>Example usage from plugin code:</strong> 37 * <strong>Example usage from plugin code:</strong>
38 * 38 *
39 * <strong>Setup:</strong> 39 * <strong>Setup:</strong>
40 * @code 40 * @code
41 * PP_Resource context; 41 * PP_Resource context;
42 * int32_t attribs[] = {PP_GRAPHICS3DATTRIB_WIDTH, 800, 42 * int32_t attribs[] = {PP_GRAPHICS3DATTRIB_WIDTH, 800,
43 * PP_GRAPHICS3DATTRIB_HEIGHT, 800, 43 * PP_GRAPHICS3DATTRIB_HEIGHT, 800,
44 * PP_GRAPHICS3DATTRIB_NONE}; 44 * PP_GRAPHICS3DATTRIB_NONE};
45 * context = g3d->Create(instance, attribs, &context); 45 * context = g3d->Create(instance, 0, attribs);
46 * inst->BindGraphics(instance, context); 46 * inst->BindGraphics(instance, context);
47 * @endcode 47 * @endcode
48 * 48 *
49 * <strong>Present one frame:</strong> 49 * <strong>Present one frame:</strong>
50 * @code 50 * @code
51 * gles2->Clear(context, GL_COLOR_BUFFER); 51 * PP_CompletionCallback callback = {
52 * g3d->SwapBuffers(context); 52 * DidFinishSwappingBuffers, 0, PP_COMPLETIONCALLBACK_FLAG_NONE,
53 * };
54 * gles2->Clear(context, GL_COLOR_BUFFER_BIT);
55 * g3d->SwapBuffers(context, callback);
53 * @endcode 56 * @endcode
54 * 57 *
55 * <strong>Shutdown:</strong> 58 * <strong>Shutdown:</strong>
56 * @code 59 * @code
57 * core->ReleaseResource(context); 60 * core->ReleaseResource(context);
58 * @endcode 61 * @endcode
59 */ 62 */
60 struct PPB_Graphics3D_1_0 { 63 struct PPB_Graphics3D_1_0 {
61 /** 64 /**
62 * GetAttribMaxValue() retrieves the maximum supported value for the 65 * GetAttribMaxValue() retrieves the maximum supported value for the
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 struct PP_CompletionCallback callback); 289 struct PP_CompletionCallback callback);
287 }; 290 };
288 291
289 typedef struct PPB_Graphics3D_1_0 PPB_Graphics3D; 292 typedef struct PPB_Graphics3D_1_0 PPB_Graphics3D;
290 /** 293 /**
291 * @} 294 * @}
292 */ 295 */
293 296
294 #endif /* PPAPI_C_PPB_GRAPHICS_3D_H_ */ 297 #endif /* PPAPI_C_PPB_GRAPHICS_3D_H_ */
295 298
OLDNEW
« ppapi/api/ppb_graphics_3d.idl ('K') | « ppapi/api/ppb_graphics_3d.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698