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_SERVICE_CONTEXT_STATE_H_ | 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
8 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ | 8 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 bool GetStateAsGLfloat( | 117 bool GetStateAsGLfloat( |
118 GLenum pname, GLfloat* params, GLsizei* num_written) const; | 118 GLenum pname, GLfloat* params, GLsizei* num_written) const; |
119 bool GetEnabled(GLenum cap) const; | 119 bool GetEnabled(GLenum cap) const; |
120 | 120 |
121 ErrorState* GetErrorState(); | 121 ErrorState* GetErrorState(); |
122 | 122 |
123 #include "gpu/command_buffer/service/context_state_autogen.h" | 123 #include "gpu/command_buffer/service/context_state_autogen.h" |
124 | 124 |
125 EnableFlags enable_flags; | 125 EnableFlags enable_flags; |
126 | 126 |
127 // pack alignment as last set by glPixelStorei | |
128 GLint pack_alignment; | |
129 | |
130 // unpack alignment as last set by glPixelStorei | |
131 GLint unpack_alignment; | |
132 | |
133 // Current active texture by 0 - n index. | 127 // Current active texture by 0 - n index. |
134 // In other words, if we call glActiveTexture(GL_TEXTURE2) this value would | 128 // In other words, if we call glActiveTexture(GL_TEXTURE2) this value would |
135 // be 2. | 129 // be 2. |
136 GLuint active_texture_unit; | 130 GLuint active_texture_unit; |
137 | 131 |
138 // The currently bound array buffer. If this is 0 it is illegal to call | 132 // The currently bound array buffer. If this is 0 it is illegal to call |
139 // glVertexAttribPointer. | 133 // glVertexAttribPointer. |
140 scoped_refptr<Buffer> bound_array_buffer; | 134 scoped_refptr<Buffer> bound_array_buffer; |
141 | 135 |
142 // Which textures are bound to texture units through glActiveTexture. | 136 // Which textures are bound to texture units through glActiveTexture. |
(...skipping 24 matching lines...) Expand all Loading... |
167 | 161 |
168 private: | 162 private: |
169 scoped_ptr<ErrorState> error_state_; | 163 scoped_ptr<ErrorState> error_state_; |
170 }; | 164 }; |
171 | 165 |
172 } // namespace gles2 | 166 } // namespace gles2 |
173 } // namespace gpu | 167 } // namespace gpu |
174 | 168 |
175 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ | 169 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
176 | 170 |
OLD | NEW |