Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Anonymous's avatar
Anonymous
9 years ago
Solved

Help needed

So I've been working with DirectX and the oculus sdk in visual studio. I have worked with directX before and understand how to render with it. So I went about looking at the sample projects. I have built the simple room sample and it works fine. I then wrote my own program to try an mimic the sample. I've followed the sample from start to finish just structured it slightly different and it wont render properly. I get a while hourglass symbol in the lower right, I'm so stumped as to why its not working I'm not even trying to render an object . All I'm doing is clearing the render targets, commiting the textures for both eyes, creating the layer and submitting the frame. If some kind soul could offer suggestions I would most appreciate it.
  • Problem with the current design of Oculus SDK and DirectX is that you have to do a lot of things right to just see something in your HMD. If you just don't know why there is something wrong I can only suggest debugging with debug messages on (will help with general DX11/12 errors but not much with Oculus errors).

    You also want to try diagnostics tools of Visual Studio 2015. But these usually also require a working rendering loop that shows something at least remotely correct.

    For my own engine I found that being able to switch between Oculus rendering and pure DirectX12 rendering helps a lot in hunting down general errors. You may want to consider such a design.

    Last resort is looking at code from other people. While this won't solve your errors immediately it will help you understand what needs to be done. I recommend the small sample code in general  DirectX 11/12 docu on MSDN. Then the DirectX Graphics samples on GitHub. If you are targeting DirectX 12 you may want to look at my own code at https://github.com/ClemensX/ShadedPath12 . And of course you have the samples in Oculus SDK. For some topics the descriptions in the dev guide are not detailed enough, so you will certainly need to look thiungs up in the Oculus provided code anyway.
  • Anonymous's avatar
    Anonymous
    9 years ago

    lamour42 said:

    Problem with the current design of Oculus SDK and DirectX is that you have to do a lot of things right to just see something in your HMD. If you just don't know why there is something wrong I can only suggest debugging with debug messages on (will help with general DX11/12 errors but not much with Oculus errors).

    You also want to try diagnostics tools of Visual Studio 2015. But these usually also require a working rendering loop that shows something at least remotely correct.

    For my own engine I found that being able to switch between Oculus rendering and pure DirectX12 rendering helps a lot in hunting down general errors. You may want to consider such a design.

    Last resort is looking at code from other people. While this won't solve your errors immediately it will help you understand what needs to be done. I recommend the small sample code in general  DirectX 11/12 docu on MSDN. Then the DirectX Graphics samples on GitHub. If you are targeting DirectX 12 you may want to look at my own code at https://github.com/ClemensX/ShadedPath12 . And of course you have the samples in Oculus SDK. For some topics the descriptions in the dev guide are not detailed enough, so you will certainly need to look thiungs up in the Oculus provided code anyway.



    Thanks for the reply I have however re wrote my code I can now render :D

4 Replies

  • Anonymous's avatar
    Anonymous
    So Ive managed to get rid of the hourglass it is still not clearing the render targets and presenting them however
  • lamour42's avatar
    lamour42
    Expert Protege
    Problem with the current design of Oculus SDK and DirectX is that you have to do a lot of things right to just see something in your HMD. If you just don't know why there is something wrong I can only suggest debugging with debug messages on (will help with general DX11/12 errors but not much with Oculus errors).

    You also want to try diagnostics tools of Visual Studio 2015. But these usually also require a working rendering loop that shows something at least remotely correct.

    For my own engine I found that being able to switch between Oculus rendering and pure DirectX12 rendering helps a lot in hunting down general errors. You may want to consider such a design.

    Last resort is looking at code from other people. While this won't solve your errors immediately it will help you understand what needs to be done. I recommend the small sample code in general  DirectX 11/12 docu on MSDN. Then the DirectX Graphics samples on GitHub. If you are targeting DirectX 12 you may want to look at my own code at https://github.com/ClemensX/ShadedPath12 . And of course you have the samples in Oculus SDK. For some topics the descriptions in the dev guide are not detailed enough, so you will certainly need to look thiungs up in the Oculus provided code anyway.
  • Anonymous's avatar
    Anonymous

    lamour42 said:

    Problem with the current design of Oculus SDK and DirectX is that you have to do a lot of things right to just see something in your HMD. If you just don't know why there is something wrong I can only suggest debugging with debug messages on (will help with general DX11/12 errors but not much with Oculus errors).

    You also want to try diagnostics tools of Visual Studio 2015. But these usually also require a working rendering loop that shows something at least remotely correct.

    For my own engine I found that being able to switch between Oculus rendering and pure DirectX12 rendering helps a lot in hunting down general errors. You may want to consider such a design.

    Last resort is looking at code from other people. While this won't solve your errors immediately it will help you understand what needs to be done. I recommend the small sample code in general  DirectX 11/12 docu on MSDN. Then the DirectX Graphics samples on GitHub. If you are targeting DirectX 12 you may want to look at my own code at https://github.com/ClemensX/ShadedPath12 . And of course you have the samples in Oculus SDK. For some topics the descriptions in the dev guide are not detailed enough, so you will certainly need to look thiungs up in the Oculus provided code anyway.



    Thanks for the reply I have however re wrote my code I can now render :D
  • galopin's avatar
    galopin
    Heroic Explorer
    @lamour42 You are a little pessimist, the API is quite minimal and it is hard to missuse it ( minus bad backend dx12 bugs with command list sharing draws on several oculus swapchain surfaces )

    @Drunken_Pirate My best advice is to turn on the d3d debug layer, and use the log callback of the oculus runtime to display any error reporting, plus test all function call return value for errors.