|
Post by alexfish on Jan 7, 2017 14:29:06 GMT 1
Hi Vovchik
Thanks for the Info.
Now need to look at configs
the is a file /boot/config.txt
Need to post all info in this file but in part . looking at your resolution 1280*720 looks like Raspberry default mode
Like. these lines are in my config
# uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720
Can post the full details of the file
Do not at present try to alter any of the configs
BR Alex
|
|
|
Post by alexfish on Jan 7, 2017 14:43:19 GMT 1
Hi Vovchik
These are the results of of your get screens
1920 1080 1920 1080 Error: SCREENSIZE(3) mode is bad: 0 = w, 1 = h and 2 = h and w. ./modes 1920 1080 1920 1080 Error: SCREENSIZE(3) mode is bad: 0 = w, 1 = h and 2 = h and w. pi@raspberrypi:~/bacon/hugrpi $ xdpyinfo | grep 'dimensions:' dimensions: 1920x1080 pixels (508x286 millimeters)
BR Alex
|
|
|
Post by vovchik on Jan 7, 2017 15:09:25 GMT 1
Dear Alex,
I tried at first to use your resolution, which the HDMI TV monitor supports, but the text was fuzzy/bad and I detected instability in the image. I then chose another HDMI mode, and it now looks OK, but I miss hving all those extra pixels. My config.txt looks like this:
# For more options and information see # http://www.raspberrypi.org/documentation/configuration/config-txt.md # Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1 # uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan disable_overscan=0 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border overscan_left=-8 overscan_right=-8 overscan_top=-29 overscan_bottom=-27 # uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) hdmi_group=1 hdmi_mode=4 # uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes #hdmi_drive=2 # uncomment to increase signal to HDMI, if you have interference, blanking, or # no display config_hdmi_boost=4 # uncomment for composite PAL #sdtv_mode=2 #uncomment to overclock the arm. 700 MHz is the default. arm_freq=800 # gpu 64 is the default. # gpu_mem=64 gpu_mem=128 # Uncomment some or all of these to enable the optional hardware interfaces #dtparam=i2c_arm=on #dtparam=i2s=on #dtparam=spi=on # Uncomment this to enable the lirc-rpi module #dtoverlay=lirc-rpi # Additional overlays and parameters are documented /boot/overlays/README # Enable audio (loads snd_bcm2835) dtparam=audio=on # NOOBS Auto-generated Settings: hdmi_force_hotplug=1
I needed the overscan bits, because, otherwise, I got a black border.
With kind regards, vovchik
|
|
|
Post by alexfish on Jan 7, 2017 15:58:15 GMT 1
Hi Vovchik
These are my settings notable disable_overscan=1
and all overscan left,right,top & bottom are disable
when it comes the view port setting . hugrpi calculates where the Actual window is and have less top bar + add 1 to the xpos to allow for the Window Frame , hence the EGL should looks as i fit be inside the Window
Do now that at first there was a Black boarder around the Desktop. IE The Desktop was smaller than the actual monitor
settings are sometimes Twitchy esp on reboot , and notable when I changed the "disable_overscan" mode hence Why I mentioned Leave configs as is for now.
Here is what happened
changed the overscan mode Reboot
Met with a Black Screen IE no desktop.. Argh . Blind leading the blind .. Reboot = Same , so entered the pixel safe mode. then reboot , Sigh of relief. Desktop was as it should be
then there Are My settings and Millage cannot be guaranteed if you opt to TRY THEM . Yet looking at your info may be able to extract the necessary to get the correct placements esp when looking at > over-scan dimensions
can build this into the hugrpi I think is a must . then possibly test an update the hugrpi
If that is working for my Screen Mode , an it works For Your system As it is now = A Bug fix Then Possible . Try other configs.
BR Alex
My configs for comparison
# For more options and information see # http://www.raspberrypi.org/documentation/configuration/config-txt.md # Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output #hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA) #hdmi_group=1 #hdmi_mode=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes #hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or # no display #config_hdmi_boost=4
# uncomment for composite PAL #sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default. #arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces #dtparam=i2c_arm=on #dtparam=i2s=on #dtparam=spi=on
# Uncomment this to enable the lirc-rpi module #dtoverlay=lirc-rpi
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835) dtparam=audio=on
# NOOBS Auto-generated Settings: hdmi_force_hotplug=1 #gpu_mem=256 #dtoverlay=vc4-kms-v3d
|
|
|
Post by alexfish on Jan 7, 2017 19:17:19 GMT 1
Hi Vovchik
Still reading etc , none the wiser onthis offset x on the canvas where mine = 10 , and for U to get 10 = 53 that is a difference of 43 pixels on a left overscan -8 and right overscan of -8
But think can compare DPI
with
LOCAL dpi g_object_get(gtk_settings_get_default(), "gtk-xft-dpi", ADDRESS(dpi), NULL) PRINT dpi
Mine = '98304'
PS If wonder why these settings on PI 3 , the offsets for the canvas Viewport are the same IE I did not change anything on the PI 2 and in PI 3 I changed the 'disable_overscan=1'
now in the window demo I posted , that has a canvas smaller than the window , compiled here on pi3
does it look ok ::
That demo code compile P2 = same , on that bases I will port the demo exec of p3 to p2 and see what happens
BR Alex
|
|
|
Post by alexfish on Jan 7, 2017 19:51:05 GMT 1
Hi Vovchik
Also thinking need to test full screen mod and see what happens
Will post shortly
if that be ok then assume can proceed in that mode and resolve windowed made later, fingers crossed
BR Alex
|
|
|
Post by alexfish on Jan 7, 2017 20:57:16 GMT 1
Hi Vovchik
Think found something
the fullscreen mode is not working either, nothing gets drawn so had do some head scratching
new at one stage 0,0 x,y it was there, so there be a math OOps when say Canvas at 10,10 , need to go back into
the c demo code to find it
so can hang on till i post again BR Alex
|
|
|
Post by alexfish on Jan 7, 2017 23:01:21 GMT 1
Hi Vovchik up to now ?? so Ha ve hard coded some of the bits in CLS here the XPOS of the canvas is fixed and the ypos is fixed at just below the title bar Can test with the CANVAS X = 0 and Y = 0 * whatever width and height Comments welcome as when the window ios at the top and when window is at bottom BR Alex the sub CLS SUB CLS() LOCAL gdk gdk = gdk_window_at_pointer(ADDRESS(MOUSEX),ADDRESS(MOUSEY)) gtk_window_get_size(win,ADDRESS(WIDTH),ADDRESS(HEIGHT)) gtk_window_get_position(win,ADDRESS(XPOS),ADDRESS(YPOS)) glClear ( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT ) 'glViewport(XPOS+1,(((HEIGHT-10)+State.screen_height)-YPOS)-20, WIDTH, HEIGHT); glViewport(20,State.screen_height-(HEIGHT+30)-YPOS, WIDTH, HEIGHT);
'glViewport(XPOS+1+canvas.x,(((State.screen_height-10)-HEIGHT)-YPOS)-20+canvas.y, canvas.width, HEIGHT-(HEIGHT- canvas.height)); END SUB
|
|
|
Post by vovchik on Jan 8, 2017 0:20:29 GMT 1
Dear Alex,
Yes, I can see now that x stays put at 0 and I can play with y. I will also look at that glViewport calculation and see what it can be fed to pin the canvas at a particular x:y in the window. And that calculation, or something similar, will be needed for the crosshair cursor, too.
With kind regards, vovchik
|
|
|
Post by alexfish on Jan 8, 2017 9:47:58 GMT 1
|
|
|
Post by alexfish on Jan 8, 2017 10:11:11 GMT 1
Hi Vovchick
Out of interest The dpi
here the
result of the dpi test
byvalue of 98304
divide by 1024
Give 96 , so that looks correct for a default , if my memory serves me well ,
BR Alex
|
|
|
Post by alexfish on Jan 8, 2017 10:42:25 GMT 1
Hi Vovchik Thinking thinking again In the EGL configs there is the source and destination to look at as well, Remember previous posts . so could this give us what is needed , from the hugrpi.bac dst_rect.x = 0 dst_rect.y = 0 dst_rect.width = State.screen_width dst_rect.height = State.screen_height
src_rect.x = 0 src_rect.y = 0 src_rect.width = State.screen_width << 16 src_rect.height = State.screen_height << 16
Added Link to EGL DOCS ref: surface HERE
|
|
|
Post by vovchik on Jan 8, 2017 11:10:42 GMT 1
Dear Alex, Thanks for the overscan links. I just compiled overscan.c and am looking at the launch script and playing with it. I might even be able to get high resolution. With kind regards, vovchik
|
|
|
Post by alexfish on Jan 8, 2017 11:22:54 GMT 1
And a snippet
from the fix script
What Do U think
######################################################################### # Is overscan enabled? If not the fix it & reboot # ######################################################################### if [ "$(vcgencmd get_config disable_overscan | awk -F '=' '{print $2}')" -eq "1" ]; then set_config_var disable_overscan 0 $CONFIG whiptail --msgbox "disable_overscan=0 added to config.txt, overscan will be enabled on next reboot. reboot & then rerun this script." 10 45 exit 1 fi
Possible bug here cos this is what a get form the terminal
vcgencmd get_config disable_overscan disable_overscan=0
and my config text is
disable_overscan=1
OOPS.
Anyway My init Overscan screen = 0,0,0,0
What is Yours
|
|
|
Post by vovchik on Jan 8, 2017 11:46:49 GMT 1
Dear Alex,
I have it enabled and have 40, 40, 21, 21. Nothing is cut off and I have no black frame, so I guess it is correct for the resolution.
With kind regards, vovchik
PS. Before running the prog, I had -8, -8, 29, 27.
|
|