Blender
V2.93
source
blender
gpu
intern
gpu_batch_private.hh
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*
16
* The Original Code is Copyright (C) 2016 by Mike Erwin.
17
* All rights reserved.
18
*/
19
27
#pragma once
28
29
#include "
GPU_batch.h
"
30
#include "
GPU_context.h
"
31
32
#include "
gpu_index_buffer_private.hh
"
33
#include "
gpu_vertex_buffer_private.hh
"
34
35
namespace
blender
{
36
namespace
gpu {
37
43
class
Batch
:
public
GPUBatch
{
44
public
:
45
virtual
~Batch
() =
default
;
46
47
virtual
void
draw
(
int
v_first,
int
v_count,
int
i_first,
int
i_count) = 0;
48
49
/* Convenience casts. */
50
IndexBuf
*
elem_
(
void
)
const
51
{
52
return
unwrap
(elem);
53
}
54
VertBuf
*
verts_
(
const
int
index)
const
55
{
56
return
unwrap
(
verts
[index]);
57
}
58
VertBuf
*
inst_
(
const
int
index)
const
59
{
60
return
unwrap
(inst[index]);
61
}
62
};
63
64
}
// namespace gpu
65
}
// namespace blender
GPU_batch.h
GPUBatch
GPUBatch
Definition:
GPU_batch.h:93
GPU_context.h
blender::gpu::Batch
Definition:
gpu_batch_private.hh:43
blender::gpu::Batch::elem_
IndexBuf * elem_(void) const
Definition:
gpu_batch_private.hh:50
blender::gpu::Batch::draw
virtual void draw(int v_first, int v_count, int i_first, int i_count)=0
blender::gpu::Batch::inst_
VertBuf * inst_(const int index) const
Definition:
gpu_batch_private.hh:58
blender::gpu::Batch::verts_
VertBuf * verts_(const int index) const
Definition:
gpu_batch_private.hh:54
blender::gpu::Batch::~Batch
virtual ~Batch()=default
blender::gpu::IndexBuf
Definition:
gpu_index_buffer_private.hh:50
blender::gpu::VertBuf
Definition:
gpu_vertex_buffer_private.hh:36
verts
static float verts[][3]
Definition:
geom_arrow_gizmo.c:26
gpu_index_buffer_private.hh
gpu_vertex_buffer_private.hh
blender::gpu::unwrap
static Context * unwrap(GPUContext *ctx)
Definition:
gpu_context_private.hh:101
blender
Definition:
BKE_attribute_access.hh:30
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1