Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update usage_examples.rst #2062

Merged
merged 3 commits into from
Sep 30, 2024

Conversation

shaneantrim
Copy link
Contributor

Changed Displaying an image, using the GPU (Full Viewport Pipeline) to Displaying an image, using the CPU (Full Viewport Pipeline)
Added Python example under Displaying an image, using the CPU (Full Viewport Pipeline)
Added Displaying an image, using the GPU comment section.

Copy link

linux-foundation-easycla bot commented Sep 27, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@carolalynn carolalynn added the devdays24 Label for PRs for Dev Days 2024. label Sep 27, 2024
@carolalynn
Copy link
Collaborator

Hi @shaneantrim, thanks for this! In general it looks good, but we required signed commits (git commit -s). To fix this since you've already committed it:

git commit --amend -s
git push <your_remote_fork_name> <your_branch_name> --force

Changed Displaying an image, using the GPU (Full Viewport Pipeline) to CPU, added Python section and added Displaying an image, using the GPU with C++ example.

Signed-off-by: shaneantrim <shaneantrim@gmail.com>
@shaneantrim
Copy link
Contributor Author

My commit has been updated and signed off on.

// Step 4: Add custom transforms for a 'canonical' Display Pipeline

// Add an fstop exposure control (in SCENE_LINEAR)
float gain = powf(2.0f, exposure_in_stops);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

The processor is then queried from the LegacyViewingPipeline.
#. **Convert your image, using the processor.**
See :ref:`usage_applybasic` for details for using the CPU.
.. code-block:: cpp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This C++ section looks like it's from the old documentation and using the old API, please remove this part.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@doug-walker can you be specific about what to remove? Sorry, I'm trying to wrap my brain around this. Do you mean everything in red starting from Get the Config.?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything in red is already removed. I was asking to remove lines 280-328.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed lines 280-328 containing Legacy C++


.. code-block:: python

def main():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this line and the call to main() below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @doug-walker, I removed def main(): and the main() call at the bottom but left ..code-block:: python so that the code is formatted as python code.

@KelSolaar
Copy link
Contributor

@doug-walker : I was wondering, do we want the C++ and Python match a bit more in what they actually implement so that it is possible to compare the difference between languages? I think that would be useful for users and maybe show that C++ is not "scary".

@KelSolaar
Copy link
Contributor

Put another way, do we want the C++ and Python examples to match almost exactly?

@doug-walker
Copy link
Collaborator

@KelSolaar , yes, ideally the C++ and Python should match, and that is the case for the other examples on this page where both languages are present. Shane is adding a new Python example (based on the old documentation but with the new API), since he is a Python dev. Ideally at some point a C++ dev could add the corresponding code.

Signed-off-by: shaneantrim <shaneantrim@gmail.com>
Signed-off-by: shaneantrim <shaneantrim@gmail.com>
Copy link
Collaborator

@carolalynn carolalynn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks, Shane!

@doug-walker doug-walker merged commit feb4ada into AcademySoftwareFoundation:main Sep 30, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devdays24 Label for PRs for Dev Days 2024.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants