Blender V4.3
gpu_drawlist_private.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2020 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "MEM_guardedalloc.h"
12
13#include "GPU_drawlist.hh"
14
15namespace blender {
16namespace gpu {
17
22class DrawList {
23 public:
24 virtual ~DrawList(){};
25
26 virtual void append(Batch *batch, int i_first, int i_count) = 0;
27 virtual void submit() = 0;
28};
29
30/* Syntactic sugar. */
31static inline GPUDrawList *wrap(DrawList *vert)
32{
33 return reinterpret_cast<GPUDrawList *>(vert);
34}
35static inline DrawList *unwrap(GPUDrawList *vert)
36{
37 return reinterpret_cast<DrawList *>(vert);
38}
39static inline const DrawList *unwrap(const GPUDrawList *vert)
40{
41 return reinterpret_cast<const DrawList *>(vert);
42}
43
44} // namespace gpu
45} // namespace blender
Read Guarded memory(de)allocation.
virtual void append(Batch *batch, int i_first, int i_count)=0
virtual void submit()=0
struct @620::@622 batch
static Context * unwrap(GPUContext *ctx)
static GPUContext * wrap(Context *ctx)