blob: 186acd4bfd3bbd5c912d76f7838a3a1e5624d1af [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001// 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
3// found in the LICENSE file.
4
5#ifndef PPAPI_CPP_GRAPHICS_3D_CLIENT_H_
6#define PPAPI_CPP_GRAPHICS_3D_CLIENT_H_
7
8#include "ppapi/c/pp_stdint.h"
9#include "ppapi/cpp/instance_handle.h"
10
11/// @file
12/// This file defines the API for callbacks related to 3D.
13
14namespace pp {
15
16class Instance;
17
18// This class provides a C++ interface for callbacks related to 3D. You
19// would normally use multiple inheritance to derive from this class in your
20// instance.
21class Graphics3DClient {
22 public:
23 ///
24 /// A constructor for creating a Graphics3DClient.
25 ///
26 /// @param[in] instance The instance that will own the new
27 /// <code>Graphics3DClient</code>.
28 explicit Graphics3DClient(Instance* instance);
29
30 /// Destructor.
31 virtual ~Graphics3DClient();
32
33 /// Graphics3DContextLost() is a notification that the context was lost for
34 /// the 3D devices.
35 virtual void Graphics3DContextLost() = 0;
36
37 private:
38 InstanceHandle associated_instance_;
39};
40
41} // namespace pp
42
43#endif // PPAPI_CPP_GRAPHICS_3D_CLIENT_H_