Lumiera  0.pre.03
»edit your freedom«
render-drive.cpp
Go to the documentation of this file.
1 /*
2  RenderDrive - repetitively advancing a render calculation stream
3 
4  Copyright (C) Lumiera.org
5  2023, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
23 
32 #include "lib/time/timevalue.hpp"
33 
34 #include <boost/functional/hash.hpp>
35 
36 
37 
38 namespace steam {
39 namespace engine {
40 
41 
45  void
46  RenderDrive::invokeJobOperation (JobParameter parameter)
47  {
48  ASSERT (parameter.nominalTime == getTimings().getFrameStartAt (parameter.invoKey.frameNumber));
49 
50  this->performJobPlanningChunk (parameter.invoKey.frameNumber);
51  }
52 
53 
55  RenderDrive::buildInstanceID (HashVal seed) const
56  {
57  UNIMPLEMENTED ("systematically generate an invoKey, distinct for the nominal time");
58  }
59 
60  size_t
61  RenderDrive::hashOfInstance (InvocationInstanceID invoKey) const
62  {
63  UNIMPLEMENTED ("the actual meat: advance the render process");
64  return boost::hash_value (invoKey.frameNumber);
65  }
66 
67 
68 
69 
70 
71  Job
73  {
74  InvocationInstanceID invoKey;
75  invoKey.frameNumber = startFrame;
76  Time nominalPlanningStartTime = getTimings().getFrameStartAt (startFrame);
77 
78  return Job(*this, invoKey, nominalPlanningStartTime);
79  }
80 
81 
82  void
83  RenderDrive::performJobPlanningChunk(FrameCnt nextStartFrame)
84  {
85  UNIMPLEMENTED ("the actual meat: advance the render process");
86  }
87 
88 
89  Job
90  RenderDrive::buildFollowUpJobFrom (Time refPoint)
91  {
92  UNIMPLEMENTED ("create a follow-up job to pick up job-planning at or after the refPoint");
93  }
94 
95 
96 
97 
98 }} // namespace engine
Execution plan to generate render jobs within a specific render process.
Job prepareRenderPlanningFrom(FrameCnt startFrame)
create the "start trigger job" Scheduling this job will effectively get a calculation stream into act...
void invokeJobOperation(JobParameter) override
entry point (interface JobClosure): invoke the concrete job operation.
Steam-Layer implementation namespace root.
Lumiera&#39;s internal time value datatype.
Definition: timevalue.hpp:308
opaque ID attached to each individual job invocation.
Definition: job.h:112
size_t HashVal
a STL compatible hash value
Definition: hash-value.h:56
Individual frame rendering task, forwarding to a closure.
Definition: job.h:277
a family of time value like entities and their relationships.
The active core within a CalcStream, causing the render mechanism to re-trigger repeatedly.