Jump to content

Rendering Image output in C ?


TheLoser

Recommended Posts

If you're asking about rendering to an openCV Mat, then it's already being done inside the sdk. You can do a quick Ctrl+F for "imshow" to find where it's displayed either distorted, undistorted, or the depth map. If you're asking how to render to the HMD, you need to implement OpenVR into the project.

Link to comment
Share on other sites

Thanks for replaying .

 

how to render image using OpenVR , I look for the samples in there SDK  but it look very complicated what I need very simple read image (jpeg or png ...) and show it in the screen.

 since the SRWorks dont support rendering image back to VIVE then we have to use your solution .

Link to comment
Share on other sites

I think I follow what you're getting at.

 

You want to render the images to a texture, and then render the texture to the HMD.

 

I'm going to refer you to the wiki page for  the compositor in OpenVR. The Submit function takes a number of formats, but they're all within typical graphics specifications (OpenGL, DirectX11, and Vulkan) and references to those textures are held within an OpenVR Texture_t struct but must already exist or be reserved in video memory.

 

https://github.com/ValveSoftware/openvr/wiki/IVRCompositor_Overview

 

In order to Submit() your images to the compositor and get them in the HMD, you're going to have to use OpenGL, DirectX, or Vulkan. Again, I'd recommend OpenGL because its learning curve is a little less steep and because there's already a good amount of integration with OpenCV (newer versions of OpenCV natively support converting cv::Mat to gl Textures IIRC and there are tons of tutorials to do so online).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...