Bug 1254

Summary: MonitorDevice.getViewportInWindowUnits().getHeight() returns the display's width on Broadcom VC IV
Product: [JogAmp] Jogl Reporter: Gottfried Haider <gottfried.haider>
Component: coreAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: normal CC: gottfried.haider, sgothel, xerxes
Priority: P4    
Version: 2.4.0   
Hardware: embedded_arm   
OS: linux   
Type: DEFECT SCM Refs:
jogl 57b519c3788bec2fa3c3575db6deadeb153352f7
Workaround: ---
Attachments: Screenshot on Raspbian Jesse

Description Gottfried Haider 2015-10-13 13:01:48 CEST
I am not intimately familiar with JOGL initialization, but while trying to figure out why the display window in current Processing (with JOGL 2.3.2) isn't centered, I came across this, on a Raspberry Pi w/ the binary driver:

screen.getWidth() returns 1920 (expected)
screen.getHeight() returns 1080 (expected)
MonitorDevice.getViewportInWindowUnits().getWidth() returns 1920 (expected)
MonitorDevice.getViewportInWindowUnits().getHeight() returns 1920

Is this the expected behavior?

If you want to probe this yourself: PSurfaceJOGL.java:311 in current processing.git

Thanks!
Comment 1 Xerxes Rånby 2015-10-14 05:24:04 CEST
please check if your /boot/config.txt contains overscan settings
https://www.raspberrypi.org/documentation/configuration/config-txt.md

The use of overscan settings is one potential source of misalignment between the DispmanX window and X11.

When I have tested JogAmp on the Rapberry Pi i have been using
disable_overscan=1
Using this configuration running a processing setch with fullScreen(P3D); is centered.

Please attach a photo screenshot to help us understand what is not centered on your Pi.
Comment 2 Gottfried Haider 2015-11-20 19:16:40 CET
Created attachment 765 [details]
Screenshot on Raspbian Jesse
Comment 3 Gottfried Haider 2015-11-20 19:17:21 CET
Happens with or without overscan. Please let me know if I can do anything else.
Comment 4 Gottfried Haider 2016-02-10 16:16:21 CET
I believe https://github.com/sgothel/jogl/pull/97 will address this. Will test when I get to it!
Comment 5 Xerxes Rånby 2016-04-04 12:44:27 CEST
The first commit message line of the patch can be changed to include the bug number like this:

Bug 1254: Fix viewport height in BCM VC IV ScreenDriver

The patch itself looks fine; Good find!
https://github.com/gohai/jogl/commit/534d243f99bf4a4bddcb1ce805ba4984a4e48a6f
Comment 6 Gottfried Haider 2016-04-04 12:52:49 CEST
Thanks Xerxes!

Pushed out as: https://github.com/gohai/jogl/commit/57b519c3788bec2fa3c3575db6deadeb153352f7
Comment 7 Sven Gothel 2019-03-26 23:30:22 CET
thank you