diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-10-25 11:43:47 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-10-25 16:50:13 +0300 |
commit | ffdb41a8bc4764042a1ee2f91c40bdf594bbdb87 (patch) | |
tree | 77549b6ddaf76ff28abbfcdd16469239835a20c3 /source/blender/draw/intern/draw_pointcloud_private.hh | |
parent | fb424db2b7bb95a6d917d1aa562609682123274a (diff) |
DRW: Pointcloud: Refactor drawing to remove instancing
This change the attribute binding scheme to something similar to the
curves objects. Attributes are now buffer textures sampled per points.
The actual geometry is now rendered using an index buffer that avoid too
many vertex shader invocation.
Drawcall is wrapped in a DRW function to reduce complexity of future
changes.
Diffstat (limited to 'source/blender/draw/intern/draw_pointcloud_private.hh')
-rw-r--r-- | source/blender/draw/intern/draw_pointcloud_private.hh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_pointcloud_private.hh b/source/blender/draw/intern/draw_pointcloud_private.hh new file mode 100644 index 00000000000..9422d7fbc99 --- /dev/null +++ b/source/blender/draw/intern/draw_pointcloud_private.hh @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later + * Copyright 2021 Blender Foundation. All rights reserved. */ + +/** \file + * \ingroup draw + */ + +#pragma once + +struct PointCloud; +struct GPUBatch; +struct GPUVertBuf; +struct GPUMaterial; + +GPUVertBuf *pointcloud_position_and_radius_get(PointCloud *pointcloud); +GPUBatch **pointcloud_surface_shaded_get(PointCloud *pointcloud, + GPUMaterial **gpu_materials, + int mat_len); +GPUBatch *pointcloud_surface_get(PointCloud *pointcloud); |