Bug 1254 - MonitorDevice.getViewportInWindowUnits().getHeight() returns the display's width on Broadcom VC IV
Summary: MonitorDevice.getViewportInWindowUnits().getHeight() returns the display's wi...
Status: IN_PROGRESS
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: tbd
Hardware: embedded_arm linux
: P4 normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2015-10-13 13:01 CEST by Gottfried Haider
Modified: 2016-04-04 12:52 CEST (History)
3 users (show)

See Also:
Type: DEFECT
SCM Refs:
Workaround: ---


Attachments
Screenshot on Raspbian Jesse (67.94 KB, image/png)
2015-11-20 19:16 CET, Gottfried Haider
Details

Note You need to log in before you can comment on or make changes to this bug.
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