OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_DEV_GRAPHICS_3D_DEV_H_ | 5 #ifndef PPAPI_CPP_DEV_GRAPHICS_3D_DEV_H_ |
6 #define PPAPI_CPP_DEV_GRAPHICS_3D_DEV_H_ | 6 #define PPAPI_CPP_DEV_GRAPHICS_3D_DEV_H_ |
7 | 7 |
8 #include "ppapi/c/dev/ppb_context_3d_dev.h" | 8 #include "ppapi/c/dev/ppb_context_3d_dev.h" |
9 | 9 |
10 #include "ppapi/cpp/instance.h" | 10 #include "ppapi/cpp/instance.h" |
11 #include "ppapi/cpp/resource.h" | 11 #include "ppapi/cpp/resource.h" |
12 | 12 |
13 namespace pp { | 13 namespace pp { |
14 | 14 |
15 class CompletionCallback; | 15 class Surface3D_Dev; |
16 | 16 |
17 class Context3D_Dev : public Resource { | 17 class Context3D_Dev : public Resource { |
18 public: | 18 public: |
19 // Creates an is_null() Context3D object. | 19 // Creates an is_null() Context3D object. |
20 Context3D_Dev() {} | 20 Context3D_Dev() {} |
21 | 21 |
22 Context3D_Dev(const Instance& instance, | 22 Context3D_Dev(const Instance& instance, |
23 PP_Config3D_Dev config, | 23 PP_Config3D_Dev config, |
24 const Context3D_Dev& share_context, | 24 const Context3D_Dev& share_context, |
25 const int32_t* attrib_list); | 25 const int32_t* attrib_list); |
26 | 26 |
27 // TODO(alokp): Move to Surface3D. | 27 int32_t BindSurfaces(Surface3D_Dev& draw, |
28 int32_t SwapBuffers() const; | 28 Surface3D_Dev& read); |
29 | 29 |
30 protected: | 30 protected: |
31 explicit Context3D_Dev(PP_Resource resource_id) : Resource(resource_id) {} | 31 explicit Context3D_Dev(PP_Resource resource_id) : Resource(resource_id) {} |
32 static Context3D_Dev FromResource(PP_Resource resource_id); | 32 static Context3D_Dev FromResource(PP_Resource resource_id); |
33 }; | 33 }; |
34 | 34 |
35 } // namespace pp | 35 } // namespace pp |
36 | 36 |
37 #endif // PPAPI_CPP_DEV_GRAPHICS_3D_DEV_H_ | 37 #endif // PPAPI_CPP_DEV_GRAPHICS_3D_DEV_H_ |
38 | 38 |
OLD | NEW |