Handle init failures

This commit is contained in:
2018-10-09 19:57:58 +02:00
parent 445edb2e68
commit 26d10da6e5

View File

@@ -112,7 +112,13 @@ int main(int argc, char** argv)
GLuint list = gen_cubes();
lvrcInitRenderingEGL(compositor, gl.egl_display, gl.egl_context, gl.egl_surface);
bool bCompositorInit = lvrcInitRenderingEGL(compositor, gl.egl_display, gl.egl_context, gl.egl_surface);
if (!bCompositorInit)
{
printf ("Could not create compositor\n");
return -1;
}
int eye_w = hmd_w/2*OVERSAMPLE_SCALE;
int eye_h = hmd_h*OVERSAMPLE_SCALE;
@@ -123,6 +129,7 @@ int main(int argc, char** argv)
if (!bSwapChainInit)
{
printf ("Could not create swapchain\n");
return -1;
}