LWJGL3 - Displays and Windows (Few questions)

Started by abcdef, November 26, 2014, 19:08:04

Previous topic - Next topic

spasi

This is not specified in GLFW, but it isn't surprising that it happens. It's probably standard behavior of the operating system.

BrickFarmer

I mentioned that going full-screen seems to steal the mouse cursor, well it is a bit stranger than just that.  If I enable the cursor using this:

glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL)


Then the cursor location is moved to the center of the Y axis, however it is moved to the center of the x-axis with double the Rift screen width.

My screens are extended mode OSX 10.8.5 with my Rift to the left of my Laptop.

I have two examples to demonstrate this.

1. start and move mouse right.  It appears on the Rift from the left edge of the screen, leaves the right edge and arrives on the left edge of the laptop.

2. start and move mouse left. It appears on the Rift from the right edge of the screen, and stops on the left edge of the Rift.  Moving it right it then traverses the Rift display twice before arriving on the left edge of the laptop.

So its almost as though it thinks there are two rift displays to the left of my monitor and centers the cursor between these two displays.

I will try and get this running on windows tomorrow and compare behavior.
Oculus Rift CV1, MBP 2016 - 2.9 i7 - Radeon Pro 460  OSX 10.12.4,  Win7 - i5 4670K - GTX1070.
Oculus Rift VR Experiments: https://github.com/WhiteHexagon

BrickFarmer

Just to confirm that I'm seeing the same behavior on my win7 box.

In addition I'm seeing some strange fps values.  On my 4 yr old mac I get ~120fps for my single textured quad.  On my windows box I see 75fps.  I guessing that is probably due to vsync.  Is the a way to change that behavior, or is it graphics driver specific.  I dont mine the vsync, apart from the fact that over time my fps is sometimes dropping to 68fps, and for a while now its running at 63fps.  Possibly some modern windows thing I dont know about for power save on the GPU or CPU?

code linked in sig.
Oculus Rift CV1, MBP 2016 - 2.9 i7 - Radeon Pro 460  OSX 10.12.4,  Win7 - i5 4670K - GTX1070.
Oculus Rift VR Experiments: https://github.com/WhiteHexagon

spasi

Vsync is controlled with glfwSwapInterval().

Not sure about the fps drop, you'd have to do some profiling (GC? something in the Oculus SDK?). Does the JOGL version exhibit the same behavior?

BrickFarmer

Quote from: spasi on December 18, 2014, 11:25:24
Vsync is controlled with glfwSwapInterval().

Not sure about the fps drop, you'd have to do some profiling (GC? something in the Oculus SDK?). Does the JOGL version exhibit the same behavior?

I think the drop is too large and continuous to be GC/SDK related.  And my JOGL version only runs on OSX so far, but I will feed back when I have tested that. 

the swapInterval didnt seem to make any difference, but I found a way to turn vsync off (was set to app specified) in the nvidia control panel. ~1500fps  8)

Probably its some power save function somewhere, since even with vsync off I'm seeing fluctuations of up to 300fps.

Any idea on the mouse behavior?



Oculus Rift CV1, MBP 2016 - 2.9 i7 - Radeon Pro 460  OSX 10.12.4,  Win7 - i5 4670K - GTX1070.
Oculus Rift VR Experiments: https://github.com/WhiteHexagon