Blender  V3.3
gl_drawlist.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2020 Blender Foundation. All rights reserved. */
3 
11 #pragma once
12 
13 #include "MEM_guardedalloc.h"
14 
15 #include "BLI_sys_types.h"
16 
17 #include "GPU_batch.h"
18 
19 #include "gpu_drawlist_private.hh"
20 
21 #include "gl_context.hh"
22 
23 namespace blender {
24 namespace gpu {
25 
29 class GLDrawList : public DrawList {
30  public:
31  GLDrawList(int length);
32  ~GLDrawList();
33 
34  void append(GPUBatch *batch, int i_first, int i_count) override;
35  void submit() override;
36 
37  private:
38  void init();
39 
41  GLBatch *batch_;
43  GLbyte *data_;
45  GLsizeiptr data_size_;
47  GLintptr command_offset_;
49  uint command_len_;
51  GLuint base_index_;
53  GLuint v_first_, v_count_;
54 
56  GLuint buffer_id_;
58  GLsizeiptr buffer_size_;
60  GLintptr data_offset_;
61 
63  GLContext *context_;
64 
65  MEM_CXX_CLASS_ALLOC_FUNCS("GLDrawList");
66 };
67 
68 } // namespace gpu
69 } // namespace blender
unsigned int uint
Definition: BLI_sys_types.h:67
GPUBatch
Definition: GPU_batch.h:78
Read Guarded memory(de)allocation.
void append(GPUBatch *batch, int i_first, int i_count) override
Definition: gl_drawlist.cc:102
void submit() override
Definition: gl_drawlist.cc:158
struct @653::@655 batch
T length(const vec_base< T, Size > &a)