Blender V5.3
draw_attributes.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "GPU_shader.hh"
10
11#include "draw_attributes.hh"
12
13namespace blender::draw {
14
19
21{
22 for (const std::string &req : b->as_span()) {
23 if (!a->contains(req)) {
24 return false;
25 }
26 }
27
28 return true;
29}
30
32{
33 if (attrs->size() >= GPU_MAX_ATTR) {
34 return;
35 }
36 attrs->add_as(name);
37}
38
39} // namespace blender::draw
bool add_as(ForwardKey &&key)
void add_multiple(Span< Key > keys)
int64_t size() const
bool contains(const Key &key) const
Span< Key > as_span() const
Utilities for rendering attributes.
void drw_attributes_add_request(VectorSet< std::string > *attrs, const StringRef name)
bool drw_attributes_overlap(const VectorSet< std::string > *a, const VectorSet< std::string > *b)
void drw_attributes_merge(VectorSet< std::string > *dst, const VectorSet< std::string > *src)