Forum Discussion
if1live
13 years agoHonored Guest
Why Win32+GL is blocked?
In Oculus SDK 0.2.4 + Render_GL_Win32_Device.cpp, cannot create RenderDevice because It return NULL!
after i modify some code like above, Win32+GL works!
I have question, oculus sdk win32+gl is work well, why block it?
// Implement static initializer function to create this class.
Render::RenderDevice* RenderDevice::CreateDevice(const RendererParams&, void* oswnd)
{
......
// return new RenderDevice(rp, hwnd, dc, context);
return 0;
}
after i modify some code like above, Win32+GL works!
I have question, oculus sdk win32+gl is work well, why block it?
4 Replies
- jhericoAdventurerI suspect because it requires additional setup. The GL headers for windows don't include glext.h in many instances. While DirectX is a known working solution, GL would require additional setup of going to the OpenGL website, downloading the appropriate header and putting it in the correct location. Anyone with the skills and understanding to do that will probably be able to figure out how to make the render device work as well.
- electromaggotHonored GuestAlso, besides "glext.h" no longer being available amongst the Windows/DX SDK header files, Microsoft does not provide an "opengl.lib" file so that you can link against "opengl.dll" and resolve all the OpenGL function call symbols!
You see, Microsoft does support OpenGL... they have for a long time... they've almost "had to"... but they seem discourage its use in favor of DirectX/3D.
So to get Win32+GL to work: not only do you have to grab yourself a "glext.h" (like from opengl.org), you'll also need something like GLee.c/GLee.h -- which I highly recommend. The GLee project loads the GL DLL and establishes the linkages manually (e.g., by using GetProcAddress()), so it does all the work. Just be sure to #include "GLee.h" wherever necessary!
It's awfully nice to be able to write code once that ports to multiple platforms. C++ and GL allow this. The Oculus guys have also done a bang-up job with their CommonSrc/Platform code. Nice going, guys!
Tadd - skooter500ExplorerI have a full C++/OpenGL with Kinect and Bullet Physics demo for Windows/Visual Studio here if its any use to you:
https://github.com/skooter500/BGE
And a video here: - if1liveHonored GuestI use glew with cmake
https://github.com/omniavinco/glew-cmake
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
- 12 years ago
- 2 months ago