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 #include <list> | 5 #include <list> |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "gpu/command_buffer/service/buffer_manager.h" | 9 #include "gpu/command_buffer/service/buffer_manager.h" |
10 #include "gpu/command_buffer/service/gl_utils.h" | 10 #include "gpu/command_buffer/service/gl_utils.h" |
11 #include "gpu/gpu_export.h" | |
12 | 11 |
13 namespace gpu { | 12 namespace gpu { |
14 namespace gles2 { | 13 namespace gles2 { |
15 | 14 |
16 // Manages vertex attributes. | 15 // Manages vertex attributes. |
17 class GPU_EXPORT VertexAttribManager { | 16 class VertexAttribManager { |
18 public: | 17 public: |
19 // Info about Vertex Attributes. This is used to track what the user currently | 18 // Info about Vertex Attributes. This is used to track what the user currently |
20 // has bound on each Vertex Attribute so that checking can be done at | 19 // has bound on each Vertex Attribute so that checking can be done at |
21 // glDrawXXX time. | 20 // glDrawXXX time. |
22 class GPU_EXPORT VertexAttribInfo { | 21 class VertexAttribInfo { |
23 public: | 22 public: |
24 typedef std::list<VertexAttribInfo*> VertexAttribInfoList; | 23 typedef std::list<VertexAttribInfo*> VertexAttribInfoList; |
25 struct Vec4 { | 24 struct Vec4 { |
26 float v[4]; | 25 float v[4]; |
27 }; | 26 }; |
28 | 27 |
29 VertexAttribInfo(); | 28 VertexAttribInfo(); |
30 ~VertexAttribInfo(); | 29 ~VertexAttribInfo(); |
31 | 30 |
32 // Returns true if this VertexAttrib can access index. | 31 // Returns true if this VertexAttrib can access index. |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 // if it is safe to draw. | 237 // if it is safe to draw. |
239 scoped_array<VertexAttribInfo> vertex_attrib_infos_; | 238 scoped_array<VertexAttribInfo> vertex_attrib_infos_; |
240 | 239 |
241 // Lists for which vertex attribs are enabled, disabled. | 240 // Lists for which vertex attribs are enabled, disabled. |
242 VertexAttribInfoList enabled_vertex_attribs_; | 241 VertexAttribInfoList enabled_vertex_attribs_; |
243 VertexAttribInfoList disabled_vertex_attribs_; | 242 VertexAttribInfoList disabled_vertex_attribs_; |
244 }; | 243 }; |
245 | 244 |
246 } // namespace gles2 | 245 } // namespace gles2 |
247 } // namespace gpu | 246 } // namespace gpu |
OLD | NEW |