Blender V4.3
dummy_vertex_buffer.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11namespace blender::gpu {
12
13class DummyVertexBuffer : public VertBuf {
14
15 public:
16 void bind_as_ssbo(uint /*binding*/) override {}
17 void bind_as_texture(uint /*binding*/) override {}
18 void wrap_handle(uint64_t /*handle*/) override {}
19
20 void update_sub(uint /*start*/, uint /*len*/, const void * /*data*/) override {}
21 void read(void * /*data*/) const override {}
22
23 protected:
24 void acquire_data() override
25 {
27 data_ = (uchar *)MEM_mallocN(sizeof(uchar) * this->size_alloc_get(), __func__);
28 }
29 void resize_data() override {}
30 void release_data() override
31 {
33 }
34 void upload_data() override {}
35 void duplicate_data(VertBuf * /*dst*/) override {}
36};
37
38} // namespace blender::gpu
unsigned char uchar
unsigned int uint
#define MEM_SAFE_FREE(v)
void read(void *) const override
void update_sub(uint, uint, const void *) override
void duplicate_data(VertBuf *) override
void wrap_handle(uint64_t) override
void *(* MEM_mallocN)(size_t len, const char *str)
Definition mallocn.cc:44
unsigned __int64 uint64_t
Definition stdint.h:90