Blender  V3.3
gpu_immediate_private.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2016 by Mike Erwin. All rights reserved. */
3 
10 #pragma once
11 
12 #include "GPU_batch.h"
13 #include "GPU_primitive.h"
14 #include "GPU_shader.h"
15 #include "GPU_vertex_format.h"
16 
17 namespace blender::gpu {
18 
19 class Immediate {
20  public:
22  uchar *vertex_data = nullptr;
31 
35  GPUShader *shader = nullptr;
37  bool strict_vertex_len = true;
38 
40  GPUBatch *batch = nullptr;
41 
49  float uniform_color[4];
50 
51  public:
52  Immediate(){};
53  virtual ~Immediate(){};
54 
55  virtual uchar *begin() = 0;
56  virtual void end() = 0;
57 };
58 
59 } // namespace blender::gpu
60 
61 void immActivate();
62 void immDeactivate();
unsigned char uchar
Definition: BLI_sys_types.h:70
unsigned int uint
Definition: BLI_sys_types.h:67
GPUBatch
Definition: GPU_batch.h:78
GPUPrimType
Definition: GPU_primitive.h:18
@ GPU_PRIM_NONE
Definition: GPU_primitive.h:33
struct GPUShader GPUShader
Definition: GPU_shader.h:20
eGPUBuiltinShader
Definition: GPU_shader.h:189
@ GPU_SHADER_TEXT
Definition: GPU_shader.h:191
eGPUBuiltinShader builtin_shader_bound
virtual void end()=0
virtual uchar * begin()=0
eGPUBuiltinShader prev_builtin_shader
void immDeactivate()
void immActivate()
unsigned short uint16_t
Definition: stdint.h:79