| 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 "gpu/command_buffer/service/vertex_attrib_manager.h" | 5 #include "gpu/command_buffer/service/vertex_attrib_manager.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 : index_(0), | 24 : index_(0), |
| 25 enabled_(false), | 25 enabled_(false), |
| 26 size_(4), | 26 size_(4), |
| 27 type_(GL_FLOAT), | 27 type_(GL_FLOAT), |
| 28 offset_(0), | 28 offset_(0), |
| 29 normalized_(GL_FALSE), | 29 normalized_(GL_FALSE), |
| 30 gl_stride_(0), | 30 gl_stride_(0), |
| 31 real_stride_(16), | 31 real_stride_(16), |
| 32 divisor_(0), | 32 divisor_(0), |
| 33 list_(NULL) { | 33 list_(NULL) { |
| 34 value_.v[0] = 0.0f; | |
| 35 value_.v[1] = 0.0f; | |
| 36 value_.v[2] = 0.0f; | |
| 37 value_.v[3] = 1.0f; | |
| 38 } | 34 } |
| 39 | 35 |
| 40 VertexAttribManager::VertexAttribInfo::~VertexAttribInfo() { | 36 VertexAttribManager::VertexAttribInfo::~VertexAttribInfo() { |
| 41 } | 37 } |
| 42 | 38 |
| 43 bool VertexAttribManager::VertexAttribInfo::CanAccess(GLuint index) const { | 39 bool VertexAttribManager::VertexAttribInfo::CanAccess(GLuint index) const { |
| 44 if (!enabled_) { | 40 if (!enabled_) { |
| 45 return true; | 41 return true; |
| 46 } | 42 } |
| 47 | 43 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 if (element_array_buffer_ == buffer) { | 120 if (element_array_buffer_ == buffer) { |
| 125 element_array_buffer_ = NULL; | 121 element_array_buffer_ = NULL; |
| 126 } | 122 } |
| 127 for (uint32 vv = 0; vv < vertex_attrib_infos_.size(); ++vv) { | 123 for (uint32 vv = 0; vv < vertex_attrib_infos_.size(); ++vv) { |
| 128 vertex_attrib_infos_[vv].Unbind(buffer); | 124 vertex_attrib_infos_[vv].Unbind(buffer); |
| 129 } | 125 } |
| 130 } | 126 } |
| 131 | 127 |
| 132 } // namespace gles2 | 128 } // namespace gles2 |
| 133 } // namespace gpu | 129 } // namespace gpu |
| OLD | NEW |