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

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

Issue 13238002: [PPAPI] Documentation fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge yet again Created 7 years, 8 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_completion_callback.h ('k') | ppapi/c/ppb_input_event.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) 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 Mar 28 10:12:11 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
(...skipping 19 matching lines...) Expand all
30 30
31 /** 31 /**
32 * @addtogroup Interfaces 32 * @addtogroup Interfaces
33 * @{ 33 * @{
34 */ 34 */
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, attribs, &context);
46 * inst->BindGraphics(instance, context); 46 * inst->BindGraphics(instance, context);
47 * </code> 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 * gles2->Clear(context, GL_COLOR_BUFFER);
52 * g3d->SwapBuffers(context); 52 * g3d->SwapBuffers(context);
53 * </code> 53 * @endcode
54 * 54 *
55 * <strong>Shutdown:</strong> 55 * <strong>Shutdown:</strong>
56 * <code> 56 * @code
57 * core->ReleaseResource(context); 57 * core->ReleaseResource(context);
58 * </code> 58 * @endcode
59 */ 59 */
60 struct PPB_Graphics3D_1_0 { 60 struct PPB_Graphics3D_1_0 {
61 /** 61 /**
62 * GetAttribMaxValue() retrieves the maximum supported value for the 62 * GetAttribMaxValue() retrieves the maximum supported value for the
63 * given attribute. This function may be used to check if a particular 63 * given attribute. This function may be used to check if a particular
64 * attribute value is supported before attempting to create a context. 64 * attribute value is supported before attempting to create a context.
65 * 65 *
66 * @param[in] instance The module instance. 66 * @param[in] instance The module instance.
67 * @param[in] attribute The attribute for which maximum value is queried. 67 * @param[in] attribute The attribute for which maximum value is queried.
68 * Attributes that can be queried for include: 68 * Attributes that can be queried for include:
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 * structure for this function. All attributes specified in 169 * structure for this function. All attributes specified in
170 * <code>PPB_Graphics3D::Create</code> can be queried for. 170 * <code>PPB_Graphics3D::Create</code> can be queried for.
171 * 171 *
172 * @return Returns <code>PP_OK</code> on success or: 172 * @return Returns <code>PP_OK</code> on success or:
173 * - <code>PP_ERROR_BADRESOURCE</code> if context is invalid 173 * - <code>PP_ERROR_BADRESOURCE</code> if context is invalid
174 * - <code>PP_ERROR_BADARGUMENT</code> if attrib_list is 0 or any attribute 174 * - <code>PP_ERROR_BADARGUMENT</code> if attrib_list is 0 or any attribute
175 * in the <code>attrib_list</code> is not a valid attribute. 175 * in the <code>attrib_list</code> is not a valid attribute.
176 * 176 *
177 * <strong>Example usage:</strong> To get the values for rgb bits in the 177 * <strong>Example usage:</strong> To get the values for rgb bits in the
178 * color buffer, this function must be called as following: 178 * color buffer, this function must be called as following:
179 * <code> 179 * @code
180 * int attrib_list[] = {PP_GRAPHICS3DATTRIB_RED_SIZE, 0, 180 * int attrib_list[] = {PP_GRAPHICS3DATTRIB_RED_SIZE, 0,
181 * PP_GRAPHICS3DATTRIB_GREEN_SIZE, 0, 181 * PP_GRAPHICS3DATTRIB_GREEN_SIZE, 0,
182 * PP_GRAPHICS3DATTRIB_BLUE_SIZE, 0, 182 * PP_GRAPHICS3DATTRIB_BLUE_SIZE, 0,
183 * PP_GRAPHICS3DATTRIB_NONE}; 183 * PP_GRAPHICS3DATTRIB_NONE};
184 * GetAttribs(context, attrib_list); 184 * GetAttribs(context, attrib_list);
185 * int red_bits = attrib_list[1]; 185 * int red_bits = attrib_list[1];
186 * int green_bits = attrib_list[3]; 186 * int green_bits = attrib_list[3];
187 * int blue_bits = attrib_list[5]; 187 * int blue_bits = attrib_list[5];
188 * </code> 188 * @endcode
189 */ 189 */
190 int32_t (*GetAttribs)(PP_Resource context, int32_t attrib_list[]); 190 int32_t (*GetAttribs)(PP_Resource context, int32_t attrib_list[]);
191 /** 191 /**
192 * SetAttribs() sets the values for each attribute in 192 * SetAttribs() sets the values for each attribute in
193 * <code>attrib_list</code>. 193 * <code>attrib_list</code>.
194 * 194 *
195 * @param[in] context The 3D graphics context. 195 * @param[in] context The 3D graphics context.
196 * @param[in] attrib_list The list of attributes whose values need to be set. 196 * @param[in] attrib_list The list of attributes whose values need to be set.
197 * <code>attrib_list</code> has the same structure as described for 197 * <code>attrib_list</code> has the same structure as described for
198 * <code>PPB_Graphics3D::Create</code>. 198 * <code>PPB_Graphics3D::Create</code>.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 struct PP_CompletionCallback callback); 286 struct PP_CompletionCallback callback);
287 }; 287 };
288 288
289 typedef struct PPB_Graphics3D_1_0 PPB_Graphics3D; 289 typedef struct PPB_Graphics3D_1_0 PPB_Graphics3D;
290 /** 290 /**
291 * @} 291 * @}
292 */ 292 */
293 293
294 #endif /* PPAPI_C_PPB_GRAPHICS_3D_H_ */ 294 #endif /* PPAPI_C_PPB_GRAPHICS_3D_H_ */
295 295
OLDNEW
« no previous file with comments | « ppapi/c/pp_completion_callback.h ('k') | ppapi/c/ppb_input_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698