Blender V5.0
eevee_sync.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2021 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
11
12#pragma once
13
14#include "BKE_duplilist.hh"
15#include "BLI_map.hh"
16#include "DNA_modifier_types.h"
17#include "DNA_object_types.h"
18#include "DRW_render.hh"
19
20#include "draw_handle.hh"
21
22namespace blender::eevee {
23
24using namespace draw;
25
26class Instance;
27
28/* -------------------------------------------------------------------- */
32
33struct BaseHandle {
34 unsigned int recalc;
35};
36
40
41struct WorldHandle : public BaseHandle {};
42
43struct SceneHandle : public BaseHandle {};
44
46 private:
47 Instance &inst_;
48
49 Map<ObjectKey, ObjectHandle> ob_handles = {};
50
51 public:
52 SyncModule(Instance &inst) : inst_(inst) {};
54
55 ObjectHandle &sync_object(const ObjectRef &ob_ref);
56 WorldHandle sync_world(const ::World &world);
57
58 void sync_mesh(Object *ob, ObjectHandle &ob_handle, const ObjectRef &ob_ref);
59 bool sync_sculpt(Object *ob, ObjectHandle &ob_handle, const ObjectRef &ob_ref);
60 void sync_pointcloud(Object *ob, ObjectHandle &ob_handle, const ObjectRef &ob_ref);
61 void sync_volume(Object *ob, ObjectHandle &ob_handle, const ObjectRef &ob_ref);
62 void sync_curves(Object *ob,
63 ObjectHandle &ob_handle,
64 const ObjectRef &ob_ref,
65 ResourceHandleRange res_handle = {},
66 ModifierData *modifier_data = nullptr,
67 ParticleSystem *particle_sys = nullptr);
68};
69
72 ObjectRef &ob_ref,
73 ObjectHandle ob_handle,
74 HairHandleCallback callback);
75
77
78} // namespace blender::eevee
Object is a sort of wrapper for general info.
A running instance of the engine.
ObjectHandle & sync_object(const ObjectRef &ob_ref)
Definition eevee_sync.cc:32
void sync_mesh(Object *ob, ObjectHandle &ob_handle, const ObjectRef &ob_ref)
Definition eevee_sync.cc:89
void sync_volume(Object *ob, ObjectHandle &ob_handle, const ObjectRef &ob_ref)
SyncModule(Instance &inst)
Definition eevee_sync.hh:52
WorldHandle sync_world(const ::World &world)
Definition eevee_sync.cc:47
bool sync_sculpt(Object *ob, ObjectHandle &ob_handle, const ObjectRef &ob_ref)
void sync_curves(Object *ob, ObjectHandle &ob_handle, const ObjectRef &ob_ref, ResourceHandleRange res_handle={}, ModifierData *modifier_data=nullptr, ParticleSystem *particle_sys=nullptr)
void sync_pointcloud(Object *ob, ObjectHandle &ob_handle, const ObjectRef &ob_ref)
void foreach_hair_particle_handle(Instance &inst, ObjectRef &ob_ref, ObjectHandle ob_handle, HairHandleCallback callback)
FunctionRef< void(ObjectHandle, ModifierData &, ParticleSystem &)> HairHandleCallback
Definition eevee_sync.hh:70