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

Side by Side Diff: gpu/command_buffer/service/context_state.h

Issue 11413094: Fix VAOs and client side arrays (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years 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
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 if (bound_texture_cube_map == texture) { 71 if (bound_texture_cube_map == texture) {
72 bound_texture_cube_map = NULL; 72 bound_texture_cube_map = NULL;
73 } 73 }
74 if (bound_texture_external_oes == texture) { 74 if (bound_texture_external_oes == texture) {
75 bound_texture_external_oes = NULL; 75 bound_texture_external_oes = NULL;
76 } 76 }
77 } 77 }
78 }; 78 };
79 79
80 struct Vec4 {
81 Vec4() {
82 v[0] = 0.0f;
83 v[1] = 0.0f;
84 v[2] = 0.0f;
85 v[3] = 1.0f;
86 }
87 float v[4];
88 };
80 89
81 struct GPU_EXPORT ContextState { 90 struct GPU_EXPORT ContextState {
82 ContextState(); 91 ContextState();
83 ~ContextState(); 92 ~ContextState();
84 93
85 void Initialize(); 94 void Initialize();
86 95
87 void RestoreState() const; 96 void RestoreState() const;
88 void InitCapabilities() const; 97 void InitCapabilities() const;
89 void InitState() const; 98 void InitState() const;
(...skipping 20 matching lines...) Expand all
110 // be 2. 119 // be 2.
111 GLuint active_texture_unit; 120 GLuint active_texture_unit;
112 121
113 // The currently bound array buffer. If this is 0 it is illegal to call 122 // The currently bound array buffer. If this is 0 it is illegal to call
114 // glVertexAttribPointer. 123 // glVertexAttribPointer.
115 BufferManager::BufferInfo::Ref bound_array_buffer; 124 BufferManager::BufferInfo::Ref bound_array_buffer;
116 125
117 // Which textures are bound to texture units through glActiveTexture. 126 // Which textures are bound to texture units through glActiveTexture.
118 std::vector<TextureUnit> texture_units; 127 std::vector<TextureUnit> texture_units;
119 128
129 // The values for each attrib.
130 std::vector<Vec4> attrib_values;
131
120 // Class that manages vertex attribs. 132 // Class that manages vertex attribs.
121 VertexAttribManager::Ref vertex_attrib_manager; 133 VertexAttribManager::Ref vertex_attrib_manager;
122 134
123 // The program in use by glUseProgram 135 // The program in use by glUseProgram
124 ProgramManager::ProgramInfo::Ref current_program; 136 ProgramManager::ProgramInfo::Ref current_program;
125 137
126 // The currently bound framebuffers 138 // The currently bound framebuffers
127 FramebufferManager::FramebufferInfo::Ref bound_read_framebuffer; 139 FramebufferManager::FramebufferInfo::Ref bound_read_framebuffer;
128 FramebufferManager::FramebufferInfo::Ref bound_draw_framebuffer; 140 FramebufferManager::FramebufferInfo::Ref bound_draw_framebuffer;
129 141
130 // The currently bound renderbuffer 142 // The currently bound renderbuffer
131 RenderbufferManager::RenderbufferInfo::Ref bound_renderbuffer; 143 RenderbufferManager::RenderbufferInfo::Ref bound_renderbuffer;
132 144
133 QueryManager::Query::Ref current_query; 145 QueryManager::Query::Ref current_query;
134 146
135 GLenum hint_generate_mipmap; 147 GLenum hint_generate_mipmap;
136 GLenum hint_fragment_shader_derivative; 148 GLenum hint_fragment_shader_derivative;
137 149
138 bool pack_reverse_row_order; 150 bool pack_reverse_row_order;
139 }; 151 };
140 152
141 } // namespace gles2 153 } // namespace gles2
142 } // namespace gpu 154 } // namespace gpu
143 155
144 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ 156 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_
145 157
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/vertex_array_object_manager_unittest.cc ('k') | gpu/command_buffer/service/context_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698