sensics / OSVR-RenderManager

Apache License 2.0
63 stars 45 forks source link

Mac port shows black screen #204

Closed russell-taylor closed 7 years ago

russell-taylor commented 7 years ago

I tried going back several commits to find out where this happened, but the mac version is showing only black screens during rendering. Linux is still working.

russell-taylor commented 7 years ago

Old version from March 29 works: ec7c3ec60b09e4323f814a27009aa72fa65ad24b

russell-taylor commented 7 years ago

Version from Jul 29 does not: a9bf800351ca044c72a5e0f589a147daa7b0d52d

russell-taylor commented 7 years ago

Version from Jun 29 d8e6c69ea9bf48a7b5a35f8145e29f3d91b530a6 works. Version from Jul 12 7193322c78d2f141fee569ded23a5fcca9bbe45d works. Version from Jul 12 f1dcb9fe4ef561494c09c9d0e9e346b4839d6e3f works. Version from Jul 12 6f583a765bba7de7d58725dc2bcdf07970f9ca83 works. Version from Jul 14 dda73e5d94a9b55957866593410af0dca9afb4c8 works.

Previous version 898567bc1794ff7eb38410b783255010e92b10c3 works The following version is the problem Version from Jul 14 13f44203eb111eaeb983d6f434c3fc7c3fb9018d does not. Version from Jul 14 7de2800c149ff82236b9aca0d31671b3213fa66a does not. Version from Jul 15 ab7f96ca18824662fffb4319b78c4039076216f6 does not.

russell-taylor commented 7 years ago

The commit that breaks this is one that is storing and re-setting the framebuffer binding

russell-taylor commented 7 years ago

If we remove the code the stores and then re-sets the framebuffer binding, we get random garbage rendered to the screen and OpenGL errors. If we leave it in, we get black and OpenGL errors after glDrawElements in PresentEye().

godbyk commented 7 years ago

By the way, git bisect is handy for tracking down these kinds of things. You tell it if the current commit is good or bad and it'll automatically checkout the next commit (binary search) until you find the problem commit.

russell-taylor commented 7 years ago

Pulling from latest master (which puts back in the VAO code) gets a black screen and a single OpenGL error at the end of OpenDisplay()

russell-taylor commented 7 years ago

The error message is coming from UpdateDistortionMeshesInternal()

russell-taylor commented 7 years ago

Okay, the error message was a red herring -- calling using the right parameter turns it back into a black screen.

russell-taylor commented 7 years ago

Taking out the checking and restoring of the bound frame buffer makes things work again on the mac. Around line 1142 of RenderManagerOpenGL.cpp...

russell-taylor commented 7 years ago

Fixed in 03b6f9cafcfe5f9e765ca1dc5dae3fc2f24f56a5 by more careful handling of the bound frame buffers.