Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Pope
ftl
Commits
f80b87e4
Commit
f80b87e4
authored
4 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Some renderer documentation
parent
4afea678
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/renderers/cpp/include/ftl/render/renderer.hpp
+19
-4
19 additions, 4 deletions
components/renderers/cpp/include/ftl/render/renderer.hpp
with
19 additions
and
4 deletions
components/renderers/cpp/include/ftl/render/renderer.hpp
+
19
−
4
View file @
f80b87e4
...
...
@@ -32,7 +32,8 @@ class Renderer : public ftl::Configurable {
* frame given as parameter is where the output channels are rendered to.
* The channel parameter is the render output channel which can either be
* Left (Colour) or Right (Colour 2). Using "Right" will also adjust the
* pose to the right eye position and use the right camera intrinsics.
* pose to the right eye position and use the right camera intrinsics. The
* pose and intrinsics also come from the given `Frame` object.
*/
virtual
void
begin
(
ftl
::
rgbd
::
Frame
&
,
ftl
::
codecs
::
Channel
)
=
0
;
...
...
@@ -43,10 +44,18 @@ class Renderer : public ftl::Configurable {
*/
virtual
void
end
()
=
0
;
/**
* Perform any final render pass that combines all results. This should be
* called after all data has been submitted.
*/
virtual
void
render
()
=
0
;
virtual
void
blend
(
ftl
::
codecs
::
Channel
)
=
0
;
/**
* If the render fails part way with an exception, it is necessary to call
* this method to reset the renderer before trying the next frame.
*/
virtual
void
cancel
()
=
0
;
protected
:
...
...
@@ -54,7 +63,11 @@ class Renderer : public ftl::Configurable {
};
/**
* A renderer specifically for RGB-D framesets.
* A renderer specifically for RGB-D framesets. To use an instance, call
* `begin`, `submit` (multiple), `render` and `end` methods in that order. Note
* that usually the `submit` and `render` calls initiate asynchronous jobs on
* the GPU and so don't block. Only `end` will block until finished. The GPU
* stream used, if any, is the output frame's CUDA stream.
*/
class
FSRenderer
:
public
ftl
::
render
::
Renderer
{
public:
...
...
@@ -63,14 +76,16 @@ class FSRenderer : public ftl::render::Renderer {
/**
* Render all frames of a frameset into the output frame. This can be called
* multiple times between `begin` and `end` to combine multiple framesets.
* multiple times between `begin` and `
r
end
er
` to combine multiple framesets.
* Note that the frameset pointer must remain valid until `end` is called,
* and ideally should not be swapped between.
*
* The channels parameter gives all of the source channels that will be
* rendered into the single colour output. These will be blended
* together by some undefined method. Non colour channels will be converted
* to RGB colour appropriately.
* to RGB colour appropriately. Config options may be able to control this
* process. The final matrix is an addition transform to apply to this
* frameset before rendering, it can be identity.
*/
virtual
bool
submit
(
ftl
::
data
::
FrameSet
*
,
ftl
::
codecs
::
Channels
<
0
>
,
const
Eigen
::
Matrix4d
&
)
=
0
;
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment