TheLoser Posted September 3, 2018 Share Posted September 3, 2018 Hi all, any way of rendering image in the C SRWorks SDK ? thanks Link to comment Share on other sites More sharing options...
LS_Tpowell Posted September 4, 2018 Share Posted September 4, 2018 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 More sharing options...
TheLoser Posted September 5, 2018 Author Share Posted September 5, 2018 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 More sharing options...
LS_Tpowell Posted September 5, 2018 Share Posted September 5, 2018 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 More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now