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 EXAMPLES_TUMBLER_OPENGL_CONTEXT_H_ | 5 #ifndef EXAMPLES_TUMBLER_OPENGL_CONTEXT_H_ |
6 #define EXAMPLES_TUMBLER_OPENGL_CONTEXT_H_ | 6 #define EXAMPLES_TUMBLER_OPENGL_CONTEXT_H_ |
7 | 7 |
8 /// | 8 /// |
9 /// @file | 9 /// @file |
10 /// OpenGLContext manages the OpenGL context in the browser that is associated | 10 /// OpenGLContext manages the OpenGL context in the browser that is associated |
(...skipping 19 matching lines...) Expand all Loading... |
30 /// OpenGLContext manages an OpenGL rendering context in the browser. | 30 /// OpenGLContext manages an OpenGL rendering context in the browser. |
31 /// | 31 /// |
32 class OpenGLContext : public pp::Graphics3DClient { | 32 class OpenGLContext : public pp::Graphics3DClient { |
33 public: | 33 public: |
34 explicit OpenGLContext(pp::Instance* instance); | 34 explicit OpenGLContext(pp::Instance* instance); |
35 | 35 |
36 /// Release all the in-browser resources used by this context, and make this | 36 /// Release all the in-browser resources used by this context, and make this |
37 /// context invalid. | 37 /// context invalid. |
38 virtual ~OpenGLContext(); | 38 virtual ~OpenGLContext(); |
39 | 39 |
40 /// The Graphics3DClient interfcace. | 40 /// The Graphics3DClient interface. |
41 virtual void Graphics3DContextLost() { | 41 virtual void Graphics3DContextLost() { |
42 assert(!"Unexpectedly lost graphics context"); | 42 assert(!"Unexpectedly lost graphics context"); |
43 } | 43 } |
44 | 44 |
45 /// Make @a this the current 3D context in @a instance. | 45 /// Make @a this the current 3D context in @a instance. |
46 /// @param instance The instance of the NaCl module that will receive the | 46 /// @param instance The instance of the NaCl module that will receive the |
47 /// the current 3D context. | 47 /// the current 3D context. |
48 /// @return success. | 48 /// @return success. |
49 bool MakeContextCurrent(pp::Instance* instance); | 49 bool MakeContextCurrent(pp::Instance* instance); |
50 | 50 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 bool flush_pending_; | 86 bool flush_pending_; |
87 | 87 |
88 const struct PPB_OpenGLES2* gles2_interface_; | 88 const struct PPB_OpenGLES2* gles2_interface_; |
89 }; | 89 }; |
90 | 90 |
91 } // namespace tumbler | 91 } // namespace tumbler |
92 | 92 |
93 #endif // EXAMPLES_TUMBLER_OPENGL_CONTEXT_H_ | 93 #endif // EXAMPLES_TUMBLER_OPENGL_CONTEXT_H_ |
94 | 94 |
95 | 95 |
OLD | NEW |