Blender V5.0
gpu_immediate_private.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2016 by Mike Erwin. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11#pragma once
12
13#include <optional>
14
15#include "GPU_batch.hh"
16#include "GPU_primitive.hh"
17#include "GPU_shader.hh"
18#include "GPU_vertex_format.hh"
19
20namespace blender::gpu {
21
22class Immediate {
23 public:
25 uchar *vertex_data = nullptr;
33 uint16_t enabled_attr_bits = 0;
34
38 gpu::Shader *shader = nullptr;
40 bool strict_vertex_len = true;
41
43 Batch *batch = nullptr;
44
46
48 std::optional<GPUBuiltinShader> prev_builtin_shader;
50 std::optional<GPUBuiltinShader> builtin_shader_bound;
52 float uniform_color[4];
53
54 Immediate() = default;
55 virtual ~Immediate() = default;
56
57 virtual uchar *begin() = 0;
58 virtual void end() = 0;
59
60 /* To be called after polyline SSBO binding. */
62};
63
64} // namespace blender::gpu
65
66void immActivate();
67void immDeactivate();
unsigned char uchar
unsigned int uint
GPUPrimType
@ GPU_PRIM_NONE
unsigned long long int uint64_t
std::optional< GPUBuiltinShader > prev_builtin_shader
virtual uchar * begin()=0
virtual void end()=0
virtual ~Immediate()=default
void polyline_draw_workaround(uint64_t offset)
std::optional< GPUBuiltinShader > builtin_shader_bound
void immDeactivate()
void immActivate()