Re: setFullscreen doesn't work
Posted by
elect on
May 12, 2015; 11:35am
URL: https://forum.jogamp.org/setFullscreen-doesn-t-work-with-the-DK2-tp4034465p4034471.html
Sven Gothel wrote
On 05/12/2015 10:52 AM, elect [via jogamp] wrote:
> I just tried on win 8.1, last nv drivers, jogl 2.3.1
>
> When I set the fullscreen on the Oculus (dk2) it doesnt really go to
> fullscreen, but a smaller resolution on the upper right corner
>
> I pick the oculus in this way (always worked so far)
See StereoDemo01 for a better approach to determine the monitor.
Do you mean this?
final StereoDevice stereoDevice = stereoDeviceFactory.createDevice(deviceIndex, null, true /* verbose */);
if( null == stereoDevice ) {
System.err.println("No StereoDevice.Context available for index "+deviceIndex);
return;
}
final boolean isGenericDevice = stereoDevice instanceof GenericStereoDevice;
if( 0 <= posx && 0 <= posy && isGenericDevice ) {
((GenericStereoDevice)stereoDevice).setSurfacePosition(posx, posy);
}
System.err.println("StereoDevice "+stereoDevice);
// Start the sensor which provides the Rift’s pose and motion.
if( !stereoDevice.startSensors(true) ) {
System.err.println("Could not start sensors on device "+deviceIndex);
}
//
//
//
final PointImmutable devicePos = stereoDevice.getPosition();
final DimensionImmutable deviceRes = stereoDevice.getSurfaceSize();
System.err.println("Device Res "+deviceRes+", reqRotation "+stereoDevice.getRequiredRotation());
System.err.println("Device Pos "+devicePos);
final MonitorDevice monitor = StereoDeviceUtil.getMonitorDevice(stereoDevice, true);
final Screen screen = monitor.getScreen();
Sven Gothel wrote
>
> And then when I need the fullscreen on the oculus, I was used to call
>
> /glWindow.setFullscreen(monitorDevices);/
works within StereoDemo01 quite well,
tested on X11/Linux and Windows.
>
> Any idea?
Well, you can see in StereoDemo01,
that we rotate the monitor for DK2 ..
you probably have missed that.
~Sven
signature.asc (828 bytes) <
http://forum.jogamp.org/attachment/4034468/0/signature.asc>
Have you tried the StereoDemo01 with the dk2?