Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: experimental/c_salt/browser_3d_device.h

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « experimental/build.scons ('k') | experimental/c_salt/c_salt.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2010 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can
3 // be found in the LICENSE file.
4
5 #ifndef C_SALT_BROWSER_3D_DEVICE_H_
6 #define C_SALT_BROWSER_3D_DEVICE_H_
7
8 ///
9 /// @file
10 /// Browser3DContext provides the browser-specific support for managing an
11 /// 3D context in the browser. Currently, all 3D browser contexts support
12 /// OpenGL ES 2.0.
13 /// @see c_salt/opengl_context.h
14 ///
15
16 #include <pgl/pgl.h>
17
18 namespace c_salt {
19 class Instance;
20 class OpenGLContext;
21
22 ///
23 /// @class Browser3DContext
24 /// @a Browser3DContext manages access to the 3D device in the browser and a 3D
25 /// rendering context on that device. A newly constructed @a Browser3DContext
26 /// is invalid until @a AcquireBrowser3DDevice() is called. After acquiring
27 /// the 3D device in the browser, you then have to create a context by calling
28 /// @a CreateBrowser3DContext().
29 /// @see AcquireBrowser3DDevice()
30 /// @see CreateBrowser3DContext()
31 ///
32 class Browser3DDevice {
33 public:
34 /// Deletes all active in-browser 3D contexts and releases the 3D device.
35 virtual ~Browser3DDevice() {}
36
37 /// Acquire the 3D device in the browser that is associated with the
38 /// @a Instance instance passed into the ctor.
39 /// @return success.
40 virtual bool AcquireBrowser3DDevice() = 0;
41
42 /// Create a 3D rendering context in the browser, and bind to @a context.
43 /// This can be called more than once to create many 3D rendering contexts
44 /// associated with the browser's 3D device.
45 virtual PGLContext CreateBrowser3DContext(OpenGLContext* context) = 0;
46
47 /// Delete the in-browser 3D context and release the 3D device. After calling
48 /// this method, the context is no longer valid.
49 virtual void DeleteBrowser3DContext() = 0;
50
51 /// The browser context is considered valid when the 3D device has been
52 /// succesfully acquired, and a 3D context has been initialized.
53 /// @return true if the 3D device is aquired.
54 virtual bool is_valid() const = 0;
55 };
56
57 /// Browser-specific subclasses must implement this factory method. The caller
58 /// takes ownership of the returned object.
59 /// @param instance The Instance instance associated with the in-browser
60 /// 3D device and context.
61 /// @return A newly-created Browser3DDevice instance.
62 Browser3DDevice* CreateBrowser3DDevice(const Instance& instance);
63
64 } // namespace c_salt
65 #endif // C_SALT_BROWSER_3D_DEVICE_H_
OLDNEW
« no previous file with comments | « experimental/build.scons ('k') | experimental/c_salt/c_salt.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698