| OLD | NEW |
| 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_PPB_GRAPHICS_3D_H_ | 5 #ifndef PPAPI_C_PPB_GRAPHICS_3D_H_ |
| 6 #define PPAPI_C_PPB_GRAPHICS_3D_H_ | 6 #define PPAPI_C_PPB_GRAPHICS_3D_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_graphics_3d.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" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 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 | 31 |
| 32 #define PPB_GRAPHICS_3D_INTERFACE_1_0 "PPB_Graphics3D;1.0" | 32 #define PPB_GRAPHICS_3D_INTERFACE_1_0 "PPB_Graphics3D;1.0" |
| 33 #define PPB_GRAPHICS_3D_INTERFACE PPB_GRAPHICS_3D_INTERFACE_1_0 | 33 #define PPB_GRAPHICS_3D_INTERFACE PPB_GRAPHICS_3D_INTERFACE_1_0 |
| 34 | 34 |
| 35 struct PPB_Graphics3D { | 35 struct PPB_Graphics3D_1_0 { |
| 36 /** | 36 /** |
| 37 * Retrieves the maximum supported value for the given attribute. | 37 * Retrieves the maximum supported value for the given attribute. |
| 38 * | 38 * |
| 39 * This function may be used to check if a particular attribute value is | 39 * This function may be used to check if a particular attribute value is |
| 40 * supported before attempting to create a context. | 40 * supported before attempting to create a context. |
| 41 * Attributes that can be queried for include: | 41 * Attributes that can be queried for include: |
| 42 * - PP_GRAPHICS3DATTRIB_ALPHA_SIZE | 42 * - PP_GRAPHICS3DATTRIB_ALPHA_SIZE |
| 43 * - PP_GRAPHICS3DATTRIB_BLUE_SIZE | 43 * - PP_GRAPHICS3DATTRIB_BLUE_SIZE |
| 44 * - PP_GRAPHICS3DATTRIB_GREEN_SIZE | 44 * - PP_GRAPHICS3DATTRIB_GREEN_SIZE |
| 45 * - PP_GRAPHICS3DATTRIB_RED_SIZE | 45 * - PP_GRAPHICS3DATTRIB_RED_SIZE |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 * Note that the same error code may also be obtained by calling GetError. | 211 * Note that the same error code may also be obtained by calling GetError. |
| 212 * | 212 * |
| 213 * On failure SwapBuffers may return the following error codes: | 213 * On failure SwapBuffers may return the following error codes: |
| 214 * - PP_ERROR_BADRESOURCE if context is invalid. | 214 * - PP_ERROR_BADRESOURCE if context is invalid. |
| 215 * - PP_ERROR_BADARGUMENT if callback is invalid. | 215 * - PP_ERROR_BADARGUMENT if callback is invalid. |
| 216 */ | 216 */ |
| 217 int32_t (*SwapBuffers)(PP_Resource context, | 217 int32_t (*SwapBuffers)(PP_Resource context, |
| 218 struct PP_CompletionCallback callback); | 218 struct PP_CompletionCallback callback); |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 typedef struct PPB_Graphics3D_1_0 PPB_Graphics3D; |
| 222 |
| 221 #endif /* PPAPI_C_PPB_GRAPHICS_3D_H_ */ | 223 #endif /* PPAPI_C_PPB_GRAPHICS_3D_H_ */ |
| OLD | NEW |