Missing objects while rendering using DK2
Hello,
I'm having some issues rendering my scene in an in-house framework using the DK2, so this might make diagnosis of this issue a bit difficult, but bare with me.
Problem:
When rendering, only objects rendered using display lists and GLUT, more specifically glutSolidSphere(), will show up in the scene. Most other objects are drawn using glVertexPointer(), glNormalPointer(), glTexCoordPointer() which point to internal memory blocks(not GPU, not using VBOs), which are accessed by a call to glDrawElements().
All of the rendering routines seem to work fine on their own, but when the oculus code is introduced, just some of the objects are not being drawn.
Thanks in advance for any suggestions, comments, etc!
If any more information is needed than what is mentioned below, just ask.
The environment is:
Windows 7
C++ & VS2013
LibOVR 0.4.3
OpenGL 4.3 (but rendering uses various methods from many opengl versions)
GLFW Window management
Multi-threaded (but I believe that all oculus/opengl/etc initialization and rendering is done in the same thread)
Initialization steps:
1. ovr_Initialize()
2. glfwInit()
3. glfwCreateWindows(...)
4. glfwMakeContextCurrent(...)
5. glewInit()
6. <internal rendering initialization> (load models, textures, etc)
7. <oculus rending intialization> (creation of hmd device, configure rendering, etc)
-- Based off forum user: nuclear's code: here
Then my program proceeds to the main rendering loop until termination.
Drawing happens in the following steps:
1. Render scene to frame buffer, we can call this fbo1
2. ovrHmd_BeginFrame(...)
3. Bind framebuffer for oculus rendering, we can call this fbo2
<start loop to render each eye's view>
3. Setup ovr rendering code with separate eye configurations/viewports/etc (again based off nuclear's code)
4. Render fbo1's contents into a quad drawn using glBegin(GL_QUADS)/glEnd()
<end loop>
5. Unbind fbo2
6. ovrHmd_EndFrame(...) to render fbo2 using oculus SDK rendering
I'm having some issues rendering my scene in an in-house framework using the DK2, so this might make diagnosis of this issue a bit difficult, but bare with me.
Problem:
When rendering, only objects rendered using display lists and GLUT, more specifically glutSolidSphere(), will show up in the scene. Most other objects are drawn using glVertexPointer(), glNormalPointer(), glTexCoordPointer() which point to internal memory blocks(not GPU, not using VBOs), which are accessed by a call to glDrawElements().
All of the rendering routines seem to work fine on their own, but when the oculus code is introduced, just some of the objects are not being drawn.
Thanks in advance for any suggestions, comments, etc!
If any more information is needed than what is mentioned below, just ask.
The environment is:
Windows 7
C++ & VS2013
LibOVR 0.4.3
OpenGL 4.3 (but rendering uses various methods from many opengl versions)
GLFW Window management
Multi-threaded (but I believe that all oculus/opengl/etc initialization and rendering is done in the same thread)
Initialization steps:
1. ovr_Initialize()
2. glfwInit()
3. glfwCreateWindows(...)
4. glfwMakeContextCurrent(...)
5. glewInit()
6. <internal rendering initialization> (load models, textures, etc)
7. <oculus rending intialization> (creation of hmd device, configure rendering, etc)
-- Based off forum user: nuclear's code: here
Then my program proceeds to the main rendering loop until termination.
Drawing happens in the following steps:
1. Render scene to frame buffer, we can call this fbo1
2. ovrHmd_BeginFrame(...)
3. Bind framebuffer for oculus rendering, we can call this fbo2
<start loop to render each eye's view>
3. Setup ovr rendering code with separate eye configurations/viewports/etc (again based off nuclear's code)
4. Render fbo1's contents into a quad drawn using glBegin(GL_QUADS)/glEnd()
<end loop>
5. Unbind fbo2
6. ovrHmd_EndFrame(...) to render fbo2 using oculus SDK rendering
