O'Reilly logo

Cardboard VR Projects for Android by Matt Schoen, Jonathan Linowes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

An explanation of threading and virtual reality

OpenGL is not thread-safe. This sounds like a design flaw. In reality, it's more like a design requirement. You want your graphics API to draw frames as quickly and frequently as possible. As you may know, or will soon learn, waiting is something that threads end up doing a lot of the time. If you introduce multithreaded access to your graphics hardware, you introduce periods where the hardware might be waiting on the CPU simply to figure out its thread scheduling and who needs access at the time. It's much simpler and faster to say "only one thread may access the GPU." Technically speaking, as graphics APIs become more advanced (DirectX 12 and Vulkan), this is not strictly true, but we will not ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required