vvuk / gecko-dev

Other
41 stars 5 forks source link

Add display resolution to the HMDVRDevice prototype #6

Open dmarcos opened 10 years ago

dmarcos commented 10 years ago

We will support HMDs other than Oculus Rift DK1. We need a way to query for the display resolution

vvuk commented 10 years ago

What you really want is the best resolution to render at for the given FOV settings, not necessarily the display resolution. It also only matters in the WebGL case, but not he CSS case. I'm trying to avoid exposing this explicitly -- I was thinking instead to have the element that goes full screen on the HMD get resized to the right resolution, and then you can query the size with getBoundingClientRect if you explicitly need to know it (e.g. for a WebGL canvas).

The "window" and final render size will be at display resolution, but that's post-distortion etc., which isn't that interesting.

toji commented 10 years ago

Agreed that the display resolution isn't very interesting. It feels strange to infer the render target size from the client rect, though.

On Wed Jul 02 2014 at 10:22:54 AM, Vladimir Vukicevic < notifications@github.com> wrote:

What you really want is the best resolution to render at for the given FOV settings, not necessarily the display resolution. It also only matters in the WebGL case, but not he CSS case. I'm trying to avoid exposing this explicitly -- I was thinking instead to have the element that goes full screen on the HMD get resized to the right resolution, and then you can query the size with getBoundingClientRect if you explicitly need to know it (e.g. for a WebGL canvas).

The "window" and final render size will be at display resolution, but that's post-distortion etc., which isn't that interesting.

— Reply to this email directly or view it on GitHub https://github.com/vvuk/gecko-dev/issues/6#issuecomment-47807953.