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