Cinder Integration w/ OpenGL
So all the Samples that ship for windows with the 4.1 SDK are using D3D for their textures and rendering - but the official docs have both D3D samples (same as in sample projects) and OpenGL sample code, ie :
// Configure OpenGL.
ovrGLConfig cfg;
cfg.OGL.Header.API = ovrRenderAPI_OpenGL;
cfg.OGL.Header.RTSize = Sizei(hmd->Resolution.w, hmd->Resolution.h);
etc etc
so, this seemed pretty straightforward to follow along, especially since Cinder does everything behind the scenes in OpenGL, and I was able to set up my config properly, but when i finally finish and pass my objects to ovrHmd_EndFrame i start getting a lot of errors.
ovrGLTexture EyeTextures[2];
//setup etc
ovrHmd_EndFrame(mHmd, headPose, EyeTexture);
Is this to be expected? are there any full samples using OpenGL anywhere? most of my errors come from what seems like the first thing it tries in CAPI_GL_HSWDisplay.cpp -> HSWDisplay::RenderInternal(ovrEyeType eye, const ovrTexture* eyeTexture)
ovrGLTexture* eyeTextureGL = const_cast<ovrGLTexture*>(reinterpret_cast<const ovrGLTexture*>(eyeTexture));
but when i look at ovrGLTexture and ovrTexture it looks like this cast is bound to fail... or am i missing something?
I'll give D3D another shot tomorrow but since i know absolutely nothing about it, it'll probably be another long day. Hope you can help!
Thanks
Anthony
// Configure OpenGL.
ovrGLConfig cfg;
cfg.OGL.Header.API = ovrRenderAPI_OpenGL;
cfg.OGL.Header.RTSize = Sizei(hmd->Resolution.w, hmd->Resolution.h);
etc etc
so, this seemed pretty straightforward to follow along, especially since Cinder does everything behind the scenes in OpenGL, and I was able to set up my config properly, but when i finally finish and pass my objects to ovrHmd_EndFrame i start getting a lot of errors.
ovrGLTexture EyeTextures[2];
//setup etc
ovrHmd_EndFrame(mHmd, headPose, EyeTexture);
Is this to be expected? are there any full samples using OpenGL anywhere? most of my errors come from what seems like the first thing it tries in CAPI_GL_HSWDisplay.cpp -> HSWDisplay::RenderInternal(ovrEyeType eye, const ovrTexture* eyeTexture)
ovrGLTexture* eyeTextureGL = const_cast<ovrGLTexture*>(reinterpret_cast<const ovrGLTexture*>(eyeTexture));
but when i look at ovrGLTexture and ovrTexture it looks like this cast is bound to fail... or am i missing something?
I'll give D3D another shot tomorrow but since i know absolutely nothing about it, it'll probably be another long day. Hope you can help!
Thanks
Anthony
