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

perform alignment on GPU #24

Open
bmegli opened this issue Jul 5, 2020 · 7 comments
Open

perform alignment on GPU #24

bmegli opened this issue Jul 5, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@bmegli
Copy link
Owner

bmegli commented Jul 5, 2020

Part of #23

There was some work in librealsense for GLSL processing blocks.
There is also GLSL example.

@bmegli bmegli added the enhancement New feature or request label Jul 5, 2020
@bmegli
Copy link
Owner Author

bmegli commented Jul 5, 2020

See rs2_gl_create_align

Side note:

@bmegli
Copy link
Owner Author

bmegli commented Jul 5, 2020

And the C++ version rs2::gl::align

@bmegli
Copy link
Owner Author

bmegli commented Jul 5, 2020

We clearly need development headers and link with realsense2-gl for this:

# Ubuntu 18.04
sudo apt-get install librealsense2-gl-dev
# CMake
target_link_libraries(realsense-nhve-depth-color nhve realsense2 realsense2-gl)

bmegli added a commit that referenced this issue Jul 5, 2020
@bmegli
Copy link
Owner Author

bmegli commented Jul 5, 2020

Proof of concept implemented in 99bb1f7.

By watching htop, intel_gpu_top and nvidia-smi with and without GL acceleration I can see that:

  • on my laptop with intetrated GPU + discrete NVIDIA GPU
  • alignment is performed on NVIDIA
  • and there is no way to control this behavior with realsense2-gl (ok for me)

@bmegli
Copy link
Owner Author

bmegli commented Jul 5, 2020

On the receiving side I get black screen with GL acceleration enabled (on sender).

There is some problem - maybe the data is not downloaded to CPU side for sending.

@xsol
Copy link

xsol commented May 23, 2023

It seems like you didn't call rs2::init_rendering(), for me this made the difference between blank screen and output as described here IntelRealSense/librealsense#11827

@Arun-Prasad-V
Copy link

Hi @bmegli,
Please refer the PR IntelRealSense/librealsense#12556.
An example for Align-GL has been added to the development branch.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants