| 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_graphics_3d_dev.h" | 8 #include "ppapi/c/dev/ppb_graphics_3d_dev.h" |
| 9 #include "ppapi/c/dev/ppb_opengles_dev.h" | |
| 10 #include "ppapi/cpp/instance.h" | |
| 11 #include "ppapi/cpp/resource.h" | |
| 12 | 9 |
| 13 namespace pp { | 10 namespace pp { |
| 14 | 11 |
| 15 class Graphics3D_Dev : public Resource { | 12 class Var; |
| 13 |
| 14 class Graphics3D_Dev { |
| 16 public: | 15 public: |
| 17 static bool GetConfigs(int32_t* configs, int32_t config_size, | 16 static int32_t GetConfigs(PP_Config3D_Dev* configs, |
| 18 int32_t* num_config); | 17 int32_t config_size, |
| 18 int32_t* num_config); |
| 19 | 19 |
| 20 static bool ChooseConfig(const int32_t* attrib_list, int32_t* configs, | 20 static int32_t GetConfigAttribs(PP_Config3D_Dev config, |
| 21 int32_t config_size, int32_t* num_config); | 21 int32_t* attrib_list); |
| 22 | 22 |
| 23 static bool GetConfigAttrib(int32_t config, int32_t attribute, | 23 static Var GetString(int32_t name); |
| 24 int32_t* value); | |
| 25 | |
| 26 static const char* QueryString(int32_t name); | |
| 27 | |
| 28 static void* GetProcAddress(const char* name); | |
| 29 | |
| 30 static uint32_t GetError(); | |
| 31 static const PPB_OpenGLES2_Dev* GetImplementation(); | |
| 32 | |
| 33 // Creates an is_null() Graphics3D object. | |
| 34 Graphics3D_Dev() {} | |
| 35 | |
| 36 Graphics3D_Dev(const Instance& instance, | |
| 37 int32_t config, | |
| 38 int32_t share_context, | |
| 39 const int32_t* attrib_list); | |
| 40 | |
| 41 bool SwapBuffers() const; | |
| 42 | |
| 43 protected: | |
| 44 explicit Graphics3D_Dev(PP_Resource resource_id) : Resource(resource_id) {} | |
| 45 static Graphics3D_Dev FromResource(PP_Resource resource_id); | |
| 46 }; | 24 }; |
| 47 | 25 |
| 48 } // namespace pp | 26 } // namespace pp |
| 49 | 27 |
| 50 #endif // PPAPI_CPP_DEV_GRAPHICS_3D_DEV_H_ | 28 #endif // PPAPI_CPP_DEV_GRAPHICS_3D_DEV_H_ |
| 51 | 29 |
| OLD | NEW |