Blender
V4.5
source
blender
editors
space_sequencer
sequencer_quads_batch.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
11
#include "
BLI_sys_types.h
"
12
13
namespace
blender::gpu
{
14
class
Batch;
15
class
IndexBuf;
16
class
VertBuf;
17
}
// namespace blender::gpu
18
19
namespace
blender::ed::vse
{
20
21
struct
ColorVertex;
22
31
class
SeqQuadsBatch
{
32
public
:
33
SeqQuadsBatch
();
34
~SeqQuadsBatch
();
35
37
void
draw
();
39
void
add_quad
(
float
x1,
float
y1,
float
x2,
float
y2,
const
uchar
color[4])
40
{
41
add_quad
(x1, y1, x1, y2, x2, y1, x2, y2, color, color, color, color);
42
}
44
void
add_quad
(
float
x1,
45
float
y1,
46
float
x2,
47
float
y2,
48
float
x3,
49
float
y3,
50
float
x4,
51
float
y4,
52
const
uchar
color[4])
53
{
54
add_quad
(x1, y1, x2, y2, x3, y3, x4, y4, color, color, color, color);
55
}
57
void
add_quad
(
float
x1,
58
float
y1,
59
float
x2,
60
float
y2,
61
float
x3,
62
float
y3,
63
float
x4,
64
float
y4,
65
const
uchar
color1[4],
66
const
uchar
color2[4],
67
const
uchar
color3[4],
68
const
uchar
color4[4]);
70
void
add_wire_quad
(
float
x1,
float
y1,
float
x2,
float
y2,
const
uchar
color[4]);
72
void
add_line
(
float
x1,
float
y1,
float
x2,
float
y2,
const
uchar
color[4])
73
{
74
add_line
(x1, y1, x2, y2, color, color);
75
}
77
void
add_line
(
78
float
x1,
float
y1,
float
x2,
float
y2,
const
uchar
color1[4],
const
uchar
color2[4]);
79
80
private
:
81
static
constexpr
int
MAX_QUADS = 1024;
82
static
constexpr
int
MAX_LINES = 4096;
83
84
blender::gpu::VertBuf
*vbo_quads =
nullptr
;
85
blender::gpu::IndexBuf
*ibo_quads =
nullptr
;
86
blender::gpu::Batch *batch_quads =
nullptr
;
87
ColorVertex
*verts_quads =
nullptr
;
88
int
quads_num = 0;
89
90
blender::gpu::VertBuf
*vbo_lines =
nullptr
;
91
blender::gpu::Batch *batch_lines =
nullptr
;
92
ColorVertex
*verts_lines =
nullptr
;
93
int
lines_num = 0;
94
};
95
96
}
// namespace blender::ed::vse
BLI_sys_types.h
uchar
unsigned char uchar
Definition
BLI_sys_types.h:67
blender::ed::vse::SeqQuadsBatch
Definition
sequencer_quads_batch.hh:31
blender::ed::vse::SeqQuadsBatch::add_quad
void add_quad(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, const uchar color[4])
Definition
sequencer_quads_batch.hh:44
blender::ed::vse::SeqQuadsBatch::~SeqQuadsBatch
~SeqQuadsBatch()
Definition
sequencer_quads_batch.cc:64
blender::ed::vse::SeqQuadsBatch::SeqQuadsBatch
SeqQuadsBatch()
Definition
sequencer_quads_batch.cc:41
blender::ed::vse::SeqQuadsBatch::draw
void draw()
Definition
sequencer_quads_batch.cc:72
blender::ed::vse::SeqQuadsBatch::add_quad
void add_quad(float x1, float y1, float x2, float y2, const uchar color[4])
Definition
sequencer_quads_batch.hh:39
blender::ed::vse::SeqQuadsBatch::add_line
void add_line(float x1, float y1, float x2, float y2, const uchar color[4])
Definition
sequencer_quads_batch.hh:72
blender::ed::vse::SeqQuadsBatch::add_wire_quad
void add_wire_quad(float x1, float y1, float x2, float y2, const uchar color[4])
Definition
sequencer_quads_batch.cc:124
blender::gpu::IndexBuf
Definition
GPU_index_buffer.hh:40
blender::gpu::VertBuf
Definition
GPU_vertex_buffer.hh:62
blender::ed::vse
Definition
ED_sequencer.hh:19
blender::gpu
Definition
blf_internal_types.hh:31
blender::ed::vse::ColorVertex
Definition
sequencer_quads_batch.cc:20
Generated on Fri Apr 3 2026 06:33:18 for Blender by
doxygen
1.11.0