Forum Discussion
godjilla
10 years agoHonored Guest
struggling with rendering on Oculus [sdk 0.7 / 0.8]
Hi. I'm an Oculus development beginner. I use OpenGL to deal with Oculus and I could easily get HMD sensor variables but I had difficulties with rendering images on HMD. What I tried were. - Cr...
godjilla
10 years agoHonored Guest
"Mars3D" wrote:
Initialise
CreateBuffers
for each frame
{
BeginFrame
for each eye
{
SetView
BindFrameBuffer
GetOffset
Render Your Scene using the offset
UnbindFrameBuffer
}
EndFrame
}
Thanks a lot but I don't get it that how to use offset to render my scene.
What I did was trying to render a triangle.
void RenderScene(){
glColor4f(1.f, 1.f, 1.f, 1.f);
glBegin(GL_TRIANGLES);
glColor3f(1.f, 0.f, 0.f);
glVertex3f(-0.6f, -0.4f, 0.f);
glColor3f(0.f, 1.f, 0.f);
glVertex3f(0.6f, -0.4f, 0.f);
glColor3f(0.f, 0.f, 1.f);
glVertex3f(0.f, 0.6f, 0.f);
glEnd();
}I just put the above code between the "BindFramebuffer" and "UnbindFramebuffer"
And I just got black void lonely scene.
Would you tell me with more detail?
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
- 1 year ago
- 2 years ago
- 8 months ago