setFullscreen doesn't work with the DK2

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

setFullscreen doesn't work with the DK2

elect
This post was updated on .
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)

      for (MonitorDevice monitorDevice : screen.getMonitorDevices()) {

            MonitorMode monitorMode = monitorDevice.getSupportedModes().get(0);

            if (monitorMode.getId() == 0
                    && monitorMode.getSizeAndRRate().surfaceSize.getResolution().getWidth() == 1080
                    && monitorMode.getSizeAndRRate().surfaceSize.getResolution().getHeight() == 1920
                    && monitorMode.getSizeAndRRate().surfaceSize.getBitsPerPixel() == 32
                    && monitorMode.getSizeAndRRate().refreshRate == 75.0
                    && MonitorMode.SizeAndRRate.flags2String(monitorMode.getSizeAndRRate().flags).toString().isEmpty()
                    && monitorMode.getRotation() == 0
//                    && monitorDevice.getSupportedModes().size() == 440
                    ) {

                return screen.getMonitorDevices().indexOf(monitorDevice);
            }
        }


and then the returned index is used to get the right monitorDevice and add it to the (empty) monitorDevices arrayList

        screen.addReference();
        monitorDevices = new ArrayList<>();

        monitorDevices.add(screen.getMonitorDevices().get(OculusFinder.getBestHdm(screen)));


And then when I need the fullscreen on the oculus, I was used to call

glWindow.setFullscreen(monitorDevices);

Any idea?
Reply | Threaded
Open this post in threaded view
|

Re: setFullscreen doesn't work

gouessej
Administrator
You should have chosen a less misleading title as I assume that the problem is reproducible only with the Occulus Rift DK2. The fullscreen mode works very well under Windows 8.1 without this device. Please reproduce your bug with an existing test case and report it against JOGL.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: setFullscreen doesn't work

Sven Gothel
Administrator
In reply to this post by elect
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.

>
> 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) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: setFullscreen doesn't work

elect
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?
Reply | Threaded
Open this post in threaded view
|

Re: setFullscreen doesn't work

Sven Gothel
Administrator
On 05/12/2015 01:35 PM, elect [via jogamp] wrote:

>     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 MonitorDevice monitor =
> StereoDeviceUtil.getMonitorDevice(stereoDevice, true);
<http://jogamp.org/git/?p=jogl.git;a=blob;f=src/newt/classes/com/jogamp/newt/opengl/util/stereo/StereoDeviceUtil.java;h=24eba6ec18609574abfe9cce3aa7d06238252e82;hb=HEAD>

yes! StereoDeviceUtil will rotate the monitor if required.

>
> Have you tried the StereoDemo01 with the dk2?

Of course, DK1 and DK2 on Linux and Windows,
as mentioned earlier.

Until end of next week I should have updated to the latest OVR SDK ..
and found time to experiment w/ head tracking.

~Sven



signature.asc (828 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: setFullscreen doesn't work

Sven Gothel
Administrator
In reply to this post by elect
On 05/13/2015 10:40 AM, Sven Gothel wrote:

> On 05/12/2015 01:35 PM, elect [via jogamp] wrote:
>>     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 MonitorDevice monitor =
>> StereoDeviceUtil.getMonitorDevice(stereoDevice, true);
>
> <http://jogamp.org/git/?p=jogl.git;a=blob;f=src/newt/classes/com/jogamp/newt/opengl/util/stereo/StereoDeviceUtil.java;h=24eba6ec18609574abfe9cce3aa7d06238252e82;hb=HEAD>
>
> yes! StereoDeviceUtil will rotate the monitor if required.
>
>>
>> Have you tried the StereoDemo01 with the dk2?
>
> Of course, DK1 and DK2 on Linux and Windows,
> as mentioned earlier.
>
Note: You might need to setup your OVR device in compatibility
mode under Windows, so it behaves like a monitor device!

> Until end of next week I should have updated to the latest OVR SDK ..
> and found time to experiment w/ head tracking.
>
> ~Sven
>
>



signature.asc (828 bytes) Download Attachment