Raspberry Pi | HackLAB https://www.geeks3d.com/hacklab 3D Programming, Prototyping and Gamedev with GeeXLab Mon, 22 Jun 2020 16:59:50 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 Vulkan on Raspberry Pi 3 https://www.geeks3d.com/hacklab/20200622/vulkan-on-raspberry-pi-3/ https://www.geeks3d.com/hacklab/20200622/vulkan-on-raspberry-pi-3/#respond Mon, 22 Jun 2020 16:59:50 +0000 https://www.geeks3d.com/hacklab/?p=1542 Few days ago, an experimental Vulkan driver for Raspberry Pi has been released HERE. RPi-VK-Driver is a low level GPU driver for the Broadcom Videocore IV GPU that implements a subset of the Vulkan (registered trademark of The Khronos Group) standard. The implementation is not conformant to the standard (therefore it cannot be called a Vulkan driver, officially) but tries to follow it as closely … Continue reading Vulkan on Raspberry Pi 3 »

The post Vulkan on Raspberry Pi 3 first appeared on HackLAB.]]>

Raspberry Pi - Vulkan

Few days ago, an experimental Vulkan driver for Raspberry Pi has been released HERE.

RPi-VK-Driver is a low level GPU driver for the Broadcom Videocore IV GPU that implements a subset of the Vulkan (registered trademark of The Khronos Group) standard. The implementation is not conformant to the standard (therefore it cannot be called a Vulkan driver, officially) but tries to follow it as closely as the hardware allows for it.

This driver supports the VideoCore IV, the GPU available on Raspberry Pi 1, 2 and 3.

I updated a bit the Vulkan plugin of GeeXLab and compared to the first time I tested Vulkan on RPi 4, I got better results… in the log file!

I tested this VK driver on a Raspberry Pi 3 with a fresh RaspiOS (2020-05-27).

According to the error message I got, it looks like this driver can’t work with X server running at the same time. When I tried to launch a simple clear window demo in Vulkan, the following message was printed in the terminal:

cannot set CRTC for connector 29: Permission denied

The author of the driver recommends to launch Vulkan demos from pure console mode:

if boot mode is set to Desktop, you’ll need to switch tty console (eg. ctrl+alt+f1) for modesetting to work. Otherwise X won’t let you do display modesetting. You can return to your desktop using ctrl+alt+f7.

GeeXLab needs a X11 window to run an OpenGL or Vulkan demo and is not ready to play with this driver. BUT a Vulkan instance has been created and properly initialized. Here is an extract of GeeXLab log file:

17:01:59(0000032)	[info ]	[Vulkan2] Vulkan renderer plugin (Windows, Linux)
17:01:59(0000033)	[info ]	[Vulkan2] Vulkan core library (libvulkan.so.1) loaded ok.
17:01:59(0000034)	[info ]	[Vulkan2] Instance extensions: 4
17:01:59(0000035)	[info ]	[Vulkan2] - 1/ VK_KHR_surface (spec version: 25)
17:01:59(0000036)	[info ]	[Vulkan2] - 2/ VK_KHR_display (spec version: 21)
17:01:59(0000037)	[info ]	[Vulkan2] - 3/ VK_EXT_debug_report (spec version: 9)
17:01:59(0000038)	[info ]	[Vulkan2] - 4/ VK_EXT_debug_utils (spec version: 1)
17:01:59(0000039)	[info ]	[Vulkan2] # instance layers: 0
17:01:59(0000040)	[info ]	[Vulkan2] # Vulkan devices: 1
17:01:59(0000041)	[info ]	[Vulkan2] [ GPU 0 ]--------------------------------------
17:01:59(0000042)	[info ]	[Vulkan2] - GPU name: VideoCore IV HW
17:01:59(0000043)	[info ]	[Vulkan2] - DeviceID: 14E4-5250
17:01:59(0000044)	[info ]	[Vulkan2] - Raw driver version: 1
17:01:59(0000045)	[info ]	[Vulkan2] - Vulkan API version: 1.1.0
17:01:59(0000046)	[info ]	[Vulkan2] - Device type: VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
17:01:59(0000047)	[info ]	[Vulkan2] - Memory heap count: 1
17:01:59(0000048)	[info ]	[Vulkan2] 		heap 0 - size: 250 MB
17:01:59(0000049)	[info ]	[Vulkan2] - Device extensions: 8
17:01:59(0000050)	[info ]	[Vulkan2] 		1/ VK_KHR_display_swapchain (spec version: 9)
17:01:59(0000051)	[info ]	[Vulkan2] 		2/ VK_KHR_maintenance1 (spec version: 2)
17:01:59(0000052)	[info ]	[Vulkan2] 		3/ VK_KHR_maintenance2 (spec version: 1)
17:01:59(0000053)	[info ]	[Vulkan2] 		4/ VK_KHR_maintenance3 (spec version: 1)
17:01:59(0000054)	[info ]	[Vulkan2] 		5/ VK_KHR_swapchain (spec version: 70)
17:01:59(0000055)	[info ]	[Vulkan2] 		6/ VK_EXT_debug_marker (spec version: 4)
17:01:59(0000056)	[info ]	[Vulkan2] 		7/ VK_KHR_driver_properties (spec version: 1)
17:01:59(0000057)	[info ]	[Vulkan2] 		8/ VK_KHR_performance_query (spec version: 1)
17:01:59(0000058)	[info ]	[Vulkan2] - Device layers: 0
17:01:59(0000059)	[info ]	[Vulkan2] vkGetPhysicalDeviceDisplayPropertiesKHR - Enumerated displays
17:01:59(0000060)	[info ]	[Vulkan2] Display ID 29
17:01:59(0000061)	[info ]	[Vulkan2] - Display name 1920x1080
17:01:59(0000062)	[info ]	[Vulkan2] - Display width 530
17:01:59(0000063)	[info ]	[Vulkan2] - Display height 300
17:01:59(0000064)	[info ]	[Vulkan2] - Display horizontal resolution 1920
17:01:59(0000065)	[info ]	[Vulkan2] - Display vertical resolution 1080
17:01:59(0000066)	[info ]	[Vulkan2] --- initializing GPU 0...
17:01:59(0000067)	[info ]	[Vulkan2] --- GPU 0 initialized ok

I hope the next time, I could run the RGB triangle demo!

The post Vulkan on Raspberry Pi 3 first appeared on HackLAB.]]>
https://www.geeks3d.com/hacklab/20200622/vulkan-on-raspberry-pi-3/feed/ 0
Vulkan on Raspberry Pi 4 https://www.geeks3d.com/hacklab/20191104/vulkan-on-raspberry-pi-4/ https://www.geeks3d.com/hacklab/20191104/vulkan-on-raspberry-pi-4/#respond Mon, 04 Nov 2019 15:11:55 +0000 https://www.geeks3d.com/hacklab/?p=1450 During the last update of GeeXLab on Raspberry Pi, I noticed the presence of some Vulkan files in the /usr/lib/arm-linux-gnueabihf/ folder: – libvulkan.so.1 – libvulkan.so.1.1.97   libvulkan.so.1 is a symbolic link that points on the real library libvulkan.so.1.1.97. According to the name of this shared object, it looks like Raspbian Buster is shipped with Vulkan 1.1.97 support. So far, the Vulkan support in GeeXLab was … Continue reading Vulkan on Raspberry Pi 4 »

The post Vulkan on Raspberry Pi 4 first appeared on HackLAB.]]>

Raspberry Pi + Vulkan logo

During the last update of GeeXLab on Raspberry Pi, I noticed the presence of some Vulkan files in the /usr/lib/arm-linux-gnueabihf/ folder:

– libvulkan.so.1
– libvulkan.so.1.1.97

Vulkan on Raspberry Pi 4

 
libvulkan.so.1 is a symbolic link that points on the real library libvulkan.so.1.1.97. According to the name of this shared object, it looks like Raspbian Buster is shipped with Vulkan 1.1.97 support.

So far, the Vulkan support in GeeXLab was limited to Windows and Linux platforms. I brought some minor changes in GeeXlab and now Vulkan demos can be played on Raspberry Pi too.

Result?

Not terrible. The Vulkan instance creation failed with the following error code:
VK_ERROR_INCOMPATIBLE_DRIVER

La messe est dite!

No operational Vulkan support in Raspbian Buster. Not yet. But Vulkan embryo is there and that’s the good point.

I will follow the evolution of Vulkan support in the next updates of Raspbian. I hope we’ll see a working implementation of Vulkan in Raspbian in a near future.

Links:

The post Vulkan on Raspberry Pi 4 first appeared on HackLAB.]]>
https://www.geeks3d.com/hacklab/20191104/vulkan-on-raspberry-pi-4/feed/ 0
GeeXLab 0.29.1 released for Raspberry Pi https://www.geeks3d.com/hacklab/20190920/geexlab-0-29-1-released-for-raspberry-pi/ https://www.geeks3d.com/hacklab/20190920/geexlab-0-29-1-released-for-raspberry-pi/#respond Fri, 20 Sep 2019 16:25:54 +0000 https://www.geeks3d.com/hacklab/?p=1434 GeeXLab for Raspberry Pi / Raspbian All GeeXLab Downloads Feedback thread / Forum (EN) Hash codes for GeeXLab_0.29.1.0_FREE_rpi_gl21.zip - file size => 81001698 bytes - MD5 => 0c10f5c40bf00066798ade9c5b7af662 - SHA1 => abf6e1c77e9dec2115ca5849057be9e3bd30eac2 - SHA256 => 12bbabb6af85086adb20ca690c1c60a56e11cb50880605eea47b63f7f824c334   1 – Release Notes This version of GeeXLab has been compiled on a Raspberry Pi 4 and I must say that, once correctly chilled (more on this topic … Continue reading GeeXLab 0.29.1 released for Raspberry Pi »

The post GeeXLab 0.29.1 released for Raspberry Pi first appeared on HackLAB.]]>

GeeXLab 0.29.1 for Raspberry Pi


Hash codes for GeeXLab_0.29.1.0_FREE_rpi_gl21.zip
- file size => 81001698 bytes
- MD5       => 0c10f5c40bf00066798ade9c5b7af662
- SHA1      => abf6e1c77e9dec2115ca5849057be9e3bd30eac2
- SHA256    => 12bbabb6af85086adb20ca690c1c60a56e11cb50880605eea47b63f7f824c334

 

1 – Release Notes

This version of GeeXLab has been compiled on a Raspberry Pi 4 and I must say that, once correctly chilled (more on this topic in an upcoming article), the compilation of GeeXLab with the new RPi 4 is fast (and faster than on RPi 3). And the HDMI 2.0 (4k @ 60 Hz) video output is perfect to drive a 4K 43-inch monitor… I really appreciate this new board.

That said, the new GeeXLab 0.29.1.0 for Raspberry Pi is available with the following changes:

– an improved FFmpeg plugin with better video / audio synchronization. The audio playback, based on OpenIL / OMX in previous versions of the plugin, is now powered by SDL2 and ALSA driver. Like for the Tinker Board, I installed ALSA dev libs and compiled SDL2 on Raspbian. This is nice because now the audio / video code of the FFmpeg plugin is the same for all platforms. Other new feature: frame seeking. Now we can now step forwards and backwards. This feature sounds simple but as often with FFmpeg, it took me hours to implement it. This brand new FFmpeg plugin will the be core of an upcoming tiny video player made with GeeXLab.

– more keyboard keys have been added: KC_TAB, KC_ESCAPE, KC_RETURN, KC_DELETE, KC_INSERT, KC_HOME, KC_PGUP, KC_PGDOWN, KC_LSHIFT, KC_RSHIFT, KC_LCONTROL, KC_RCONTROL, KC_NUMLOCK, KC_LMENU and KC_LMENU.

– new demos / code-samples are shipped with GeeXLab. These demos are available in:
{GeeXLab folder}/demopack01/ and {GeeXLab folder}/demopack02/.

The OpenGL support is still OpenGL 2.1. The new RPi 4 + Raspbian Buster brings OpenGL 3.1 and OpenGL ES 3.0 support. OpenGL ES 3.0 is GPU accelerated and offers more or less the same features than GL 2.1. OpenGL 3.1 is not accelerated (only software inplementation) that’s why I didn’t add its support.

 
Built-in meshes demo:
{GeeXLab folder}/demopack01-gl21/d07-meshes/


GeeXLab 0.29.1 on Raspberry Pi - new built-in meshes demo

 
Shadertoy demos:
{GeeXLab folder}/demopack02/shadertoy/09-noise-animation-electric.xml
and
{GeeXLab folder}/demopack02/shadertoy/14-tunnel-nexor.xml


GeeXLab 0.29.1 on Raspberry Pi - Shadertoy demo

 
GeeXLab 0.29.1.0 for Raspberry Pi has been compiled with a Raspberry Pi 4 on Raspbian 10 (Buster) with gcc/g++ 8.3.0 (GeeXLab app and all core libraries and plugins).

 

2 – Changelog

This changelog is intended for all versions of GeeXLab.

Full changelog from beginning of time is available HERE.

Version 0.29.1.0 - 2019.09.19
-----------------------------
* (2019.09.19) [Vulkan plugin] fixed an issue with swapchain resize.
* (2019.09.19) [Vulkan plugin] fixed a buffer overflow (vkCmdCopyBuffer-size) in vertex/index buffer creation.
+ (2019.09.19) [Raspberry Pi] added SDL2/audio support in the FFmpeg plugin. OMX/IL is disabled. 
+ (2019.09.11) added screenshot support to the Vulkan renderer (via do_screenshot(), do_screenshot_v{2, 3, 4, 5}() of gh_utils).
! (2019.09.11) fixed / improved gh_imgui.input_text() function.
! (2019.09.11) improved the calculation of text width in gh_font.get_text_width().
* (2019.09.11) fixed bug in do_screenshot_v4() and do_screenshot_v5() of gh_utils in Lua.
+ (2019.09.09) added support of seeking in the FFmpeg plugin.
+ (2019.09.09) FFmpeg plugin + audio is now available on TinkerOS (Tinker Board).
! (2019.09.07) the FFmpeg plugin has been updated with latest version 4.20 of FFmpeg SDK and latest SDL2 2.0.10 SDK (for audio).
! (2019.09.06) [RPi + X11 + GL2.1] Python 3 plugin is compiled with Python 3.7.3 libs.
* (2019.09.06) bugfix: Python 2 and Python 3 plugins: the Python plugin was stopped when Py_GetPythonHome() returned a NULL value. It's no longer the case (this bug was visible on the latest Raspbian / Buster).
! (2019.09.05) [Linux] PhysX 4 plugin: the CPU scene dispatcher is now initialized with the correct number of CPU threads (for example 16 with a RyZen 7 1700 CPU).
+ (2019.09.05) added several key codes in the keyboard mapping on Linux (and RPi + X11): KC_TAB, KC_ESCAPE, KC_RETURN, KC_DELETE, KC_INSERT, KC_HOME, KC_PGUP, KC_PGDOWN, KC_LSHIFT, KC_RSHIFT, KC_LCONTROL, KC_RCONTROL, KC_NUMLOCK, KC_LMENU and KC_LMENU.
* (2019.09.05) bugfix: fixed a minor initialization bug in gh_bullet3, gh_physx3 and gh_physx4. Now get_version() works even if start() function is not called before.
! (2019.09.05) [Windows / Linux] updated ImageMagick plugin with latest version 7.0.8-63.
- (2019.09.05) ftgl plugin removed from linux version (compilation errors...).
! (2019.09.04) improved slider_1i(), slider_1f(), slider_4f(), vslider_1f(), vslider_1i(), color_edit_4f() and color_picker_4f() of gh_imgui lib.
* (2019.09.04) bugfix: fixed a crash in gh_sqlite3.db_exec() when an error is detected by SQLite3.
+ (2019.09.04) added pack_rgba_u8() and unpack_rgba_u8() to gh_utils.
+ (2019.09.02) added tree_node_ex() and tab_item_begin_v2() to gh_imgui.
* (2019.08.26) fixed the title bar update in the PRO version.


GeeXLab 0.29.1 on Raspberry Pi

The post GeeXLab 0.29.1 released for Raspberry Pi first appeared on HackLAB.]]>
https://www.geeks3d.com/hacklab/20190920/geexlab-0-29-1-released-for-raspberry-pi/feed/ 0
GeeXLab 0.13.0 Released for All Platforms (Windows, Linux, macOS and RPi) https://www.geeks3d.com/hacklab/20161116/geexlab-0-13-0-released-for-all-platforms-windows-linux-macos-and-rpi/ https://www.geeks3d.com/hacklab/20161116/geexlab-0-13-0-released-for-all-platforms-windows-linux-macos-and-rpi/#respond Wed, 16 Nov 2016 19:51:22 +0000 http://www.geeks3d.com/hacklab/?p=1190 A new update of GeeXLab is available for all supported platforms: Windows (32/64-bit), Linux (64-bit), macOS and Raspberry Pi / Raspbian (OpenGL ES 2.0, OpenGL 2.1). Where is the version 0.12.x.x for all platforms? Honestly I don’t know. Versions 0.12.0 and 0.12.1 have been released on June 2016 for Windows, but I failed to release them for other platforms, probably due to a lack of … Continue reading GeeXLab 0.13.0 Released for All Platforms (Windows, Linux, macOS and RPi) »

The post GeeXLab 0.13.0 Released for All Platforms (Windows, Linux, macOS and RPi) first appeared on HackLAB.]]>

GeeXLab - Windows, Linux, macOS and RPi

A new update of GeeXLab is available for all supported platforms: Windows (32/64-bit), Linux (64-bit), macOS and Raspberry Pi / Raspbian (OpenGL ES 2.0, OpenGL 2.1).

Where is the version 0.12.x.x for all platforms? Honestly I don’t know. Versions 0.12.0 and 0.12.1 have been released on June 2016 for Windows, but I failed to release them for other platforms, probably due to a lack of time. During recent coding sessions, I added many new features to GeeXLab and I finally decided to jump to the version 0.13.

GeeXLab 0.13.0 is for LEDs addicts. On Windows, I added the support of Logitech’s LED SDK. Logitech’s LED SDK functions are available in Lua and Python (the new lib is gh_logiled) and allow to program all Logitech’s devices that have LEDs like the G810 Orion. I will write a post about how to use Logitech LED functions (Updated @ 2016-11-18: the post is available HERE).


Logitech LED SDK demo

 
The second big feature of GeeXLab 0.13.0 is the support of RGB LED matrix panels in the Raspberry Pi version. Now you can easily control any RGB LED panel (16×32, 32×32, etc.) in Lua and Python using the new gh_rpi.rgbmatrix_xxxx() set of functions. This is very cool and easy to use. You can render any kind of scene on the RGB LED matrix panel. You are not limited to simple 2D shapes or text. I will write articles about that topic very very shortly.


RGL LED matrix 32x32 panel - GeeXLab demo on Raspberry Pi

 
GeeXLab 0.13.0.0 as well as the code sample pack can be downloaded from THIS PAGE.

For the other features, changes and bug-fixes, just read the changelog (full changelog is available HERE):

Version 0.13.0.0 - 2016.11.01
-----------------------------
+ [RPi] added a set of functions (rgbmatrix_xxxx()) to deal with 
  RGB LED matrix in the gh_rpi lib (lua/python).
! [WINDOWS] Vulkan plugin recompiled with latest Vulkan API headers (v1.0.32).
! [WINDOWS] updated the GPU monitoring plugin with GeForce GTX 1050, GTX 1050 Ti, 
  NVIDIA TITAN X (Pascal), GeForce GTX 1060 6G and 3G, GeForce GTX 980M (1617)
  and GTX 980 (161A), AMD RAdeon RX 400 (RX 480, RX 470 and RX 460), Quadro P5000, 
  Quadro P6000, Quadro M6000 12GB, M6000 24GB, Quadra K620, K1200 and K2200.
+ added gpu_mem_to_cpu_mem() to gh_texture lib (lua/python).
* fixed a bug in the gh_utils.raycast_get_ray_ortho_cam().
+ [WINDOWS] added support of Logitech LED SDK in a new lib: gh_logiled 
  (lua/python).
+ [WINDOWS/PRO] added set_alpha() to gh_window lib (lua/python).
+ [PRO] fixed bugs in the export of the scene in binary format.
+ added update_box_size() to gh_mesh lib (lua / python).
+ added new fonctions in gh_utils for managing arrays of shared variables: 
  shared_variable_create_array(), shared_variable_set_array_value_1f(), 
  shared_variable_get_array_value_1f(), shared_variable_set_array_value_1i(),
  shared_variable_get_array_value_1i(), shared_variable_set_array_value_str() 
  and shared_variable_get_array_value_str(). 
+ added create_from_file_v9(), gpu_memory_upload() and gpu_memory_unload()
  to gh_texture lib (lua / python).
+ added resize_quad() to gh_mesh. resize_quad() is actually an alias 
  of update_quad_size().  
+ added exe_script_v2() to gh_utils lib  (lua / python).
* fixed a bug in Lua state initialization during the execution of ZOMBIE 
  scripts.
+ added do_screenshot_v3() to gh_utils (lua / python).
* fixed gh_utils.do_screenshot(): now the viewport information is properly 
  used: size (width and height) and offsets (x and y) .


Version 0.12.2.0 - 2016.06.09
-----------------------------
+ added support of texture 2D array in render targets. 
  New functions: create_array2d() and array2d_set_draw_layer() added 
  to gh_render_target lib (lua/python).
! updated the texture filtering in the OpenGL renderer.
! [WINDOWS] updated the GPU monitoring plugin with latest NVAPI R367.
The post GeeXLab 0.13.0 Released for All Platforms (Windows, Linux, macOS and RPi) first appeared on HackLAB.]]>
https://www.geeks3d.com/hacklab/20161116/geexlab-0-13-0-released-for-all-platforms-windows-linux-macos-and-rpi/feed/ 0
How to Disable the Blank Screen on Raspberry Pi (Raspbian) https://www.geeks3d.com/hacklab/20160108/how-to-disable-the-blank-screen-on-raspberry-pi-raspbian/ https://www.geeks3d.com/hacklab/20160108/how-to-disable-the-blank-screen-on-raspberry-pi-raspbian/#comments Fri, 08 Jan 2016 09:56:54 +0000 http://www.geeks3d.com/hacklab/?p=922 How to Disable the Blank Screen on Raspberry Pi.

The post How to Disable the Blank Screen on Raspberry Pi (Raspbian) first appeared on HackLAB.]]>
Here are two techniques to disable the blank screen on the Raspberry Pi. By default the screen is blanked after around 10/15 minutes if no user input (mouse or keyboard) is detected.

I successfully tested both methods with a Raspberry Pi 2 + latest Raspbian Jessie (v4.1) + 7-inch touchscreen display.

1 – Disabling the blank screen once

You can disable the blank screen once with the following command line instructions:

$ sudo xset s off
$ sudo xset -dpms
$ sudo xset s noblank

 
xset s off disable the screen saver, xset -dpms disables the DPMS (Display Power Management Signaling) and xset s noblank tells to X server to not blank the video device.

 

2 – Disabling the blank screen forever


Update (2018/12/26)
It looks like this method no longer works with recent version of Raspbian. See section 3 for alternative techniques.


If you want to disable the blank screen at every startup, just update the /etc/lightdm/lightdm.conf file and add in the [SeatDefaults] section the following command:

[SeatDefaults]
xserver-command=X -s 0 -dpms

 
You need root rights to update the lightdm.conf file. You can use the nano editor:

$ sudo nano /etc/lightdm/lightdm.conf

 

3 – Other Techniques with Recent Versions of Raspbian

Here are some techniques I found but I didn’t tested them yet.

3.1 – Install xscreensaver

xscreensaver is a screen saver utility for X Windows. Run the following command to install it:

$ sudo apt-get install xscreensaver

Once installed, go to Preferences option in the main desktop menu. You should find the screen saver application. Launch it and search for the option to disable it completely.

via.

3.2 – Updating LXDE-pi/autostart

In root mode, edit the following file: /home/pi/.config/lxsession/LXDE-pi/autostart and add the following lines:

@xset s off
@xset -dpms 
@xset s noblank

These lines are the same than section 1. This technique should be persistant.

The post How to Disable the Blank Screen on Raspberry Pi (Raspbian) first appeared on HackLAB.]]>
https://www.geeks3d.com/hacklab/20160108/how-to-disable-the-blank-screen-on-raspberry-pi-raspbian/feed/ 6
How to Update the Time on Raspberry Pi (Raspbian) https://www.geeks3d.com/hacklab/20160108/how-to-update-the-time-on-raspberry-pi-raspbian/ https://www.geeks3d.com/hacklab/20160108/how-to-update-the-time-on-raspberry-pi-raspbian/#respond Fri, 08 Jan 2016 09:17:37 +0000 http://www.geeks3d.com/hacklab/?p=914 If you need to update the date and time of your Raspberry Pi running on Raspbian, you can do it automatically with the following command (in a terminal): $ sudo dpkg-reconfigure tzdata Then, just select you geographic area and your time zone, that’s all:

The post How to Update the Time on Raspberry Pi (Raspbian) first appeared on HackLAB.]]>
If you need to update the date and time of your Raspberry Pi running on Raspbian, you can do it automatically with the following command (in a terminal):

$ sudo dpkg-reconfigure tzdata

Then, just select you geographic area and your time zone, that’s all:


Configure time on Raspberry Pi / Raspbian
Configure time on Raspberry Pi / Raspbian
Configure time on Raspberry Pi / Raspbian

The post How to Update the Time on Raspberry Pi (Raspbian) first appeared on HackLAB.]]>
https://www.geeks3d.com/hacklab/20160108/how-to-update-the-time-on-raspberry-pi-raspbian/feed/ 0
How to Control the Window Opacity on the Raspberry Pi https://www.geeks3d.com/hacklab/20151207/how-to-control-the-window-opacity-on-the-raspberry-pi/ https://www.geeks3d.com/hacklab/20151207/how-to-control-the-window-opacity-on-the-raspberry-pi/#respond Mon, 07 Dec 2015 11:23:21 +0000 http://www.geeks3d.com/hacklab/?p=842 On the Raspberry Pi there is a very nice feature that allows to create very cool shaped windows: the control of the opacity of the 3D window. The control of the opacity is currently done in GeeXLab in the window XML node with two attributes: alpha rpi_alpha_flag The default values are alpha=1.0 and rpi_alpha_flag=1 : <window name="EGLWindow01" title="freetype-gl demo (GLES 2.0)" width="800" height="800" gl_version_major="2" gl_version_minor="0" … Continue reading How to Control the Window Opacity on the Raspberry Pi »

The post How to Control the Window Opacity on the Raspberry Pi first appeared on HackLAB.]]>
On the Raspberry Pi there is a very nice feature that allows to create very cool shaped windows: the control of the opacity of the 3D window.

The control of the opacity is currently done in GeeXLab in the window XML node with two attributes:

  • alpha
  • rpi_alpha_flag

The default values are alpha=1.0 and rpi_alpha_flag=1 :

<window name="EGLWindow01" title="freetype-gl demo (GLES 2.0)" 
        width="800" height="800"
        gl_version_major="2" gl_version_minor="0"
        alpha="1.0" rpi_alpha_flag="1" />

 
Let’s take a simple demo that displays the Raspberry Pi logo (a PNG image with transparency) and let’s see how rpi_alpha_flag acts on the opacity.

The demo is available in the code sample pack (gles2/freetypegl/demo_gles2_v2.xml). The code sample pack as well as GeeXLab for the Raspberry Pi can be downloaded from THIS PAGE.

rpi_alpha_flag=1

rpi_alpha_flag=1 and alpha=1.0 is the default mode: the window is fully opaque.


GeeXLab - Window opacity on the Raspberry Pi

 
With alpha less than 1.0, the whole window is transparent.


GeeXLab - Window opacity on the Raspberry Pi

 

rpi_alpha_flag=0

When rpi_alpha_flag=0, the alpha value has no longer impact. In this mode, the alpha value outputed by the pixel shader on the default framebuffer is used to control the transparency.

On the following screenshot, the Raspberry Pi PNG image logo is fully transparent outside the raspberry and fully opaque inside. The pixel shader outputs the following alpha:

vec4 raspberry_tex = texture2D(tex0, uv);
gl_FragColor.rgb = raspberry_tex.rgb;
gl_FragColor.a = raspberry_tex.a;


GeeXLab - Window opacity on the Raspberry Pi

 

rpi_alpha_flag=2

rpi_alpha_flag=2 can be seen as a mix between the previous modes. If alpha=1.0, we get:


GeeXLab - Window opacity on the Raspberry Pi

 
If alpha is less than 1.0, we get a transparent window without touching the alpha value of the pixel shader:


GeeXLab - Window opacity on the Raspberry Pi

The post How to Control the Window Opacity on the Raspberry Pi first appeared on HackLAB.]]>
https://www.geeks3d.com/hacklab/20151207/how-to-control-the-window-opacity-on-the-raspberry-pi/feed/ 0
GeeXLab 0.9.1.0 Released for Raspberry Pi https://www.geeks3d.com/hacklab/20151207/geexlab-0-9-1-0-released-for-raspberry-pi/ https://www.geeks3d.com/hacklab/20151207/geexlab-0-9-1-0-released-for-raspberry-pi/#respond Mon, 07 Dec 2015 08:57:47 +0000 http://www.geeks3d.com/hacklab/?p=813 GeeXLab for Raspberry Pi (or RPi) platforms is ready to download. This new version of GeeXLab for the RPi improves the management of the opacity of the 3D window. You can now have a fully opaque window, or a transparent window. I will detail transparent windows on the RPi in another post. New functions have been added for moving the position of the 3D window … Continue reading GeeXLab 0.9.1.0 Released for Raspberry Pi »

The post GeeXLab 0.9.1.0 Released for Raspberry Pi first appeared on HackLAB.]]>
GeeXLab for Raspberry Pi (or RPi) platforms is ready to download.

This new version of GeeXLab for the RPi improves the management of the opacity of the 3D window. You can now have a fully opaque window, or a transparent window. I will detail transparent windows on the RPi in another post. New functions have been added for moving the position of the 3D window in Lua and Python. By default, the 3D window is not movable, but you can program this behavior using:

x, y = gh_input.mouse_getpos()
gh_window.set_position(0, x, y)

 
You can download GeeXLab 0.9.1.0 from THIS LINK.

Version 0.9.1.0 - 2015.12.07
----------------------------
! [RPi] added a new attribut named rpi_alpha_flag to the window XML 
  node. This attribute allows a better management of the alpha channel 
  of the 3d window.
+ [RPi] added set_position(), get_position() and get_screen_size()
  to gh_window lib (lua/ python). These functions are currently
  only available on Raspberry Pi.
! [OSX] updated plugin_gxc_leapmotion_x64.dylib for Mac OS X with the
  LeapMotion SDK 2.3.1.
! [OSX] updated the mouse Y coordinate in GeeXLab Mac OS X version. 
  The Y coord is offseted by the height of the window. Now the function
  gh_input.mouse_getpos() returns a correct value for all OSes.
* fixed a bug in the ftgl plugin that appeared OpenGL 2.1 drivers.
  With theses drivers, the font texture was not uploaded in GPU mem.
+ added 32-bit version of GeeXLab for Windows that targets also
  Windows XP platforms.
+ added command line option /logfile_suffix to specify a suffix
  for the log file name.
  Ex: /logfile_suffix=_test01. The suffix allows to manage several
  instances of GeeXLab, each instance having its own logfile.
* fixed a bug in polyline/wideline module. The bug has been
  introduced with recent changes in the low level 3d lib.
* fixed some bugs in the plugin_gxc_ftgl_x64 plugin. These bugs have
  been introduced with recent changes in the low level 3d lib.
* [WINDOWS] fixed few typos (GLSL Hacker was still present in some live
  coding boxes).
! [WINDOWS] updated plugin_gxc_ffmpeg_x32.dll for Windows with 
  FFmpeg 2.8.3. All other versions of the plugin (win64, linux, osx, 
  rpi) still use FFmpeg 2.6.2.
! [WINDOWS] updated plugin_gxc_leapmotion_x64.dll for Windows with the
  LeapMotion SDK 2.3.1.

The full changelog is available HERE.


GeeXLab 0.9.1.0 for Raspberry Pi

The post GeeXLab 0.9.1.0 Released for Raspberry Pi first appeared on HackLAB.]]>
https://www.geeks3d.com/hacklab/20151207/geexlab-0-9-1-0-released-for-raspberry-pi/feed/ 0