Replies: 1 comment
-
Solved the problem and updated the method GetNativeDxResource
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've just opened some of my old MG code and have been working on updating them from NET Framework 4.8 to .NET 6.0/7.0. Most of my old projects went smooth to update, but I have run into some trouble on a project that was using my Oculus headset.
My old code was based on a for long forgotten project, but I found som identical code on https://github.com/demonixis/C3DE
To get the Occulus headset working, there is a need to access the native textures for two render targets, This was done before with this code;
After the upgrade this code created an exception, since the "_texture" was not found
But in the latest update (3.8.1.303) I found that this code could be simplified with;
Unfortunately the procedure was only returning IntPtr.Zero
To fix this, I changed the creation of the two render targets, forcing it to use shared memory
Now I finally got the handle to the textures and hoped everything should work. But as soon as I submitted them to Oculus (via the same DLL I used a couple of years ago) I run into my latest problem
The error: System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
I must have missed something but can not figure it out. Any help is welcome
Kind regards
Robert
Beta Was this translation helpful? Give feedback.
All reactions