| OLD | NEW |
| 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 #ifndef PPAPI_CPP_GRAPHICS_3D_H_ | 5 #ifndef PPAPI_CPP_GRAPHICS_3D_H_ |
| 6 #define PPAPI_CPP_GRAPHICS_3D_H_ | 6 #define PPAPI_CPP_GRAPHICS_3D_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/ppb_graphics_3d.h" | 8 #include "ppapi/c/ppb_graphics_3d.h" |
| 9 #include "ppapi/cpp/resource.h" | 9 #include "ppapi/cpp/resource.h" |
| 10 | 10 |
| 11 /// @file | 11 /// @file |
| 12 /// This file defines the API to create a 3D rendering context in the browser. | 12 /// This file defines the API to create a 3D rendering context in the browser. |
| 13 namespace pp { | 13 namespace pp { |
| 14 | 14 |
| 15 class CompletionCallback; | 15 class CompletionCallback; |
| 16 class InstanceHandle; | 16 class InstanceHandle; |
| 17 | 17 |
| 18 /// This class represents a 3D rendering context in the browser. | 18 /// This class represents a 3D rendering context in the browser. |
| 19 class Graphics3D : public Resource { | 19 class Graphics3D : public Resource { |
| 20 public: | 20 public: |
| 21 /// Default constructor for creating an is_null() Graphics3D object. | 21 /// Default constructor for creating an is_null() Graphics3D object. |
| 22 Graphics3D(); | 22 Graphics3D(); |
| 23 | 23 |
| 24 /// A constructor for creating and and initializing a 3D rendering context. | 24 /// A constructor for creating and initializing a 3D rendering context. |
| 25 /// The returned context is created off-screen and must be attached | 25 /// The returned context is created off-screen and must be attached |
| 26 /// to a module instance using <code>Instance::BindGraphics</code> to draw on | 26 /// to a module instance using <code>Instance::BindGraphics</code> to draw on |
| 27 /// the web page. | 27 /// the web page. |
| 28 /// | 28 /// |
| 29 /// @param[in] instance The instance with which this resource will be | 29 /// @param[in] instance The instance with which this resource will be |
| 30 /// associated. | 30 /// associated. |
| 31 /// | 31 /// |
| 32 /// @param[in] attrib_list The list of attributes (name=value pairs) for the | 32 /// @param[in] attrib_list The list of attributes (name=value pairs) for the |
| 33 /// context. The list is terminated with | 33 /// context. The list is terminated with |
| 34 /// <code>PP_GRAPHICS3DATTRIB_NONE</code>. The <code>attrib_list</code> may | 34 /// <code>PP_GRAPHICS3DATTRIB_NONE</code>. The <code>attrib_list</code> may |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 /// | 184 /// |
| 185 /// @return An int32_t containing <code>PP_ERROR_BADRESOURCE</code> if | 185 /// @return An int32_t containing <code>PP_ERROR_BADRESOURCE</code> if |
| 186 /// context is invalid or <code>PP_ERROR_BADARGUMENT</code> if callback is | 186 /// context is invalid or <code>PP_ERROR_BADARGUMENT</code> if callback is |
| 187 /// invalid. | 187 /// invalid. |
| 188 int32_t SwapBuffers(const CompletionCallback& cc); | 188 int32_t SwapBuffers(const CompletionCallback& cc); |
| 189 }; | 189 }; |
| 190 | 190 |
| 191 } // namespace pp | 191 } // namespace pp |
| 192 | 192 |
| 193 #endif // PPAPI_CPP_GRAPHICS_3D_H_ | 193 #endif // PPAPI_CPP_GRAPHICS_3D_H_ |
| OLD | NEW |