Forum Discussion
marky1124
13 years agoExplorer
Visual Studio and OpenGL
Hi,
I'm interested in whether I can build a Rift project on Windows in Visual Studio using OpenGL. I'm hoping someone has already figured out some of this stuff. Can anyone tell me whether it's possible to do this using the SDK Oculus gives us?
Looking at the Windows and Linux SDK packages I can see that the Samples/CommonSrc files are identical. Am I right that the Windows SDK uses DirectX and the Linux SDK uses OpenGL?
Has anyone converted the samples to run on Windows using OpenGL?
Cheers,
Mark
I'm interested in whether I can build a Rift project on Windows in Visual Studio using OpenGL. I'm hoping someone has already figured out some of this stuff. Can anyone tell me whether it's possible to do this using the SDK Oculus gives us?
Looking at the Windows and Linux SDK packages I can see that the Samples/CommonSrc files are identical. Am I right that the Windows SDK uses DirectX and the Linux SDK uses OpenGL?
Has anyone converted the samples to run on Windows using OpenGL?
Cheers,
Mark
3 Replies
- jhericoAdventurerThe SDK doesn't manage the graphics engine, just allows you to interface with the HMD and the sensor. You're free to build an application in OpenGL and use the information read from the SDK to position the cameras.
In order to perform the distortion required for rendering you need a multi pass approach. You first do two normal renders to custom contexts to basically create the entire scene as a texture (or rather two textures, one for each eye). You then do a second pass rendering the texture(s) to the actual framebuffer using a specialized fragment shader to provide the appropriate distortion.
There are a couple of other threads on the forum dealing with writing a simple OpenGL application for the Rift. Take a look around and see if one has the information you need. - atavenerAdventurerIn the latest SDK, in Samples/CommonSrc/ there are some files Render_GL_Win32_Device.cpp/h.
I don't have Windows/VS, and haven't looked at these files, but I'm guessing someone did this as part of the process of developing the Linux/OpenGL version of the samples -- if so, they should be workable. - marky1124ExplorerThank you for your replies (sorry it's taken me so long to respond).
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 months ago
- 7 months ago
- 8 years ago