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 // This file contains the ContextState class. | 5 // This file contains the ContextState class. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_H_ | 7 #ifndef GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_H_ |
8 #define GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_H_ | 8 #define GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_H_ |
9 | 9 |
10 #include <GLES2/gl2.h> | 10 #include <GLES3/gl3.h> |
11 #include <vector> | 11 #include <vector> |
12 #include "gles2_impl_export.h" | 12 #include "gles2_impl_export.h" |
13 | 13 |
14 namespace gpu { | 14 namespace gpu { |
15 namespace gles2 { | 15 namespace gles2 { |
16 | 16 |
17 struct GLES2_IMPL_EXPORT ClientContextState { | 17 struct GLES2_IMPL_EXPORT ClientContextState { |
18 ClientContextState(); | 18 ClientContextState(); |
19 ~ClientContextState(); | 19 ~ClientContextState(); |
20 | 20 |
21 // Returns true if state was cached in which case 'enabled' will be set to the | 21 // Returns true if state was cached in which case 'enabled' will be set to the |
22 // current state. | 22 // current state. |
23 bool GetEnabled(GLenum cap, bool* enabled) const; | 23 bool GetEnabled(GLenum cap, bool* enabled) const; |
24 | 24 |
25 // Sets the state of a capability. | 25 // Sets the state of a capability. |
26 // Returns true if the capability is one that is cached. | 26 // Returns true if the capability is one that is cached. |
27 // 'changed' will be true if the state was different from 'enabled. | 27 // 'changed' will be true if the state was different from 'enabled. |
28 bool SetCapabilityState(GLenum cap, bool enabled, bool* changed); | 28 bool SetCapabilityState(GLenum cap, bool enabled, bool* changed); |
29 | 29 |
30 #include "gpu/command_buffer/client/client_context_state_autogen.h" | 30 #include "gpu/command_buffer/client/client_context_state_autogen.h" |
31 | 31 |
32 EnableFlags enable_flags; | 32 EnableFlags enable_flags; |
33 }; | 33 }; |
34 | 34 |
35 } // namespace gles2 | 35 } // namespace gles2 |
36 } // namespace gpu | 36 } // namespace gpu |
37 | 37 |
38 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_H_ | 38 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_H_ |
39 | 39 |
OLD | NEW |