How to create and use TextureSwapChain in OpenGL?
Hello, I'm currently trying to use the Native SDK of OVR. But I've a problem : https://developer.oculus.com/documentation/pcsdk/latest/concepts/dg-render/ What should I put instead of "...", I tried FBOs, but doesn't works. And how to use while render it. Thanks. EDIT : It was not a problem with FBO, so yes you should you fbos there if (ovr_CreateTextureSwapChainGL(session, &desc, &textureSwapChain) == ovrSuccess) { // Sample texture access: int texId; ovr_GetTextureSwapChainBufferGL(session, textureSwapChain, 0, &texId); glBindTexture(GL_TEXTURE_2D, texId); ... }544Views0likes0Commentsovr_CreateTextureSwapChainGL crashes everytime
ovrResult result = ovr_CreateTextureSwapChainGL(Session, &desc, &TextureChain); crashes everytime: i've copied this example from many different sources, including the oculus developer guides and documentation. I've tried to isolate the code, but still, even having only the initialization and the desc values validation, it crashes everytime. The initialize is the same as any initialize: ovrResult result = ovr_Initialize(nullptr); if (OVR_FAILURE(result)) return; ovrSession session; ovrGraphicsLuid luid; result = ovr_Create(&session, &luid); if (OVR_FAILURE(result)) { ovr_Shutdown(); return; } ovrHmdDesc hmdDesc = ovr_GetHmdDesc(session); ovrSizei resolution = hmdDesc.Resolution; ovrTextureSwapChain textureSwapChain = 0; ovrTextureSwapChainDesc desc = {}; desc.Type = ovrTexture_2D; desc.ArraySize = 1; desc.Format = OVR_FORMAT_R8G8B8A8_UNORM_SRGB; desc.Width = 256; desc.Height = 256; desc.MipLevels = 1; desc.SampleCount = 1; desc.StaticImage = ovrFalse; The error in the debug is Unhandled exception at 0x00000000 in A.exe: 0xC0000005: Access violation., but it doesn't help a lot. Why do I have this problem? Can you help me? Somebody else got the same issue? Thanks2.3KViews0likes4Comments