Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
vertex_buffer.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_IMPELLER_CORE_VERTEX_BUFFER_H_
6#define FLUTTER_IMPELLER_CORE_VERTEX_BUFFER_H_
7
10
11namespace impeller {
12
15
16 //----------------------------------------------------------------------------
17 /// The index buffer binding used by the vertex shader stage.
19
20 //----------------------------------------------------------------------------
21 /// The total count of vertices, either in the vertex_buffer if the
22 /// index_type is IndexType::kNone or in the index_buffer otherwise.
23 size_t vertex_count = 0u;
24
25 //----------------------------------------------------------------------------
26 /// The type of indices in the index buffer. The indices must be tightly
27 /// packed in the index buffer.
28 ///
30
31 constexpr explicit operator bool() const {
32 return static_cast<bool>(vertex_buffer) &&
33 (index_type == IndexType::kNone || static_cast<bool>(index_buffer));
34 }
35};
36
37} // namespace impeller
38
39#endif // FLUTTER_IMPELLER_CORE_VERTEX_BUFFER_H_
@ kNone
Does not use the index buffer.
BufferView index_buffer
The index buffer binding used by the vertex shader stage.