// // Copyright 2013 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Helper structures about Generic Vertex Attribute. //
// // Implementation of Generic Vertex Attribute Bindings for ES3.1. The members are intentionally made // private in order to hide implementation details. // class VertexBinding final : angle::NonCopyable
{ public:
VertexBinding(); explicit VertexBinding(GLuint boundAttribute);
VertexBinding(VertexBinding &&binding);
~VertexBinding();
VertexBinding &operator=(VertexBinding &&binding);
// Mapping from this binding to all of the attributes that are using this binding.
AttributesMask mBoundAttributesMask;
};
// // Implementation of Generic Vertex Attributes for ES3.1 // struct VertexAttribute final : private angle::NonCopyable
{ explicit VertexAttribute(GLuint bindingIndex);
VertexAttribute(VertexAttribute &&attrib);
VertexAttribute &operator=(VertexAttribute &&attrib);
// Called from VertexArray. void updateCachedElementLimit(const VertexBinding &binding);
GLint64 getCachedElementLimit() const { return mCachedElementLimit; }
bool enabled; // For glEnable/DisableVertexAttribArray const angle::Format *format;
constvoid *pointer;
GLuint relativeOffset;
GLuint vertexAttribArrayStride; // ONLY for queries of VERTEX_ATTRIB_ARRAY_STRIDE
GLuint bindingIndex;
// Special value for the cached element limit on the integer overflow case. static constexpr GLint64 kIntegerOverflow = std::numeric_limits<GLint64>::min();
private: // This is kept in sync by the VertexArray. It is used to optimize draw call validation.
GLint64 mCachedElementLimit;
};
// Warning: you should ensure binding really matches attrib.bindingIndex before using this function.
size_t ComputeVertexAttributeStride(const VertexAttribute &attrib, const VertexBinding &binding);
// Warning: you should ensure binding really matches attrib.bindingIndex before using this function.
GLintptr ComputeVertexAttributeOffset(const VertexAttribute &attrib, const VertexBinding &binding);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.