info-beamer

INFOBEAMER_FULLSCALE environment variable when using Hosted

Hi,

The open-source version of info-beamer has a an environment variable called INFOBEAMER_FULLSCALE which lets it ignore the actual screen aspect ratio when scaling the GL viewport. I just verified that the Pi version also supports this variable and when set does the correct thing.
Unfortunately there is no config option in Infobeamer Hosted that allows to set the variable. To try this i had to add the environment variable manually by adding it to /service/info-beamer/run. This is of course no real solution since this change will be lost on the next upgrade.
Would it be possible to add a config option for this? Or is there any other way to set custom environment variables?

regards
christian

This setting isn’t available and should be considered deprecated. On the Pi4 for example, this mode isn’t supported at all. If you need to upscale odd size content to full the whole screen, my suggestion would be to gl.setup(NATIVE_WIDTH, NATIVE_HEIGHT), so you fill the complete screen and then use gl.scale to scale the resulting screen space into the resolution you want to use.

What would be your use case for this feature anyway?

We use info-beamer for up next screens at a venue that uses a very old digital signage system. All the screens are basically old 16:9 TV screens running at PAL resolution. This means the pixels are not square and therefore everything that drives the screens needs to generate the image to look correct when scaled from 720X576 to 1024x576.
The easiest way to do this is to run gl.setup( (16/9) * NATIVE_HEIGHT, NATIVE_HEIGHT) and just pretend the screen is actually 1024x576 which will then be reported by WIDTH and HEIGHT.

We use gl.scale at the moment but since we sometimes need to call gl.ortho (which also resets the matrix) we need to re-apply the scaling factor. This lead to very a very ugly codebase that i’m about to clean up. So i’m looking for easier ways to do this.

In that case, I would wrap the gl.ortho calls into a function that additionally uses gl.scale for that. I think something like

gl.setup(NATIVE_WIDTH, NATIVE_HEIGHT)

local function new_gl_ortho()
    gl.ortho()
    WIDTH = 1024
    HEIGHT = 576
    gl.scale(NATIVE_WIDTH / WIDTH, NATIVE_HEIGHT / HEIGHT)
end

The result should be the same as using gl.setup(1024, 576) and INFOBEAMER_FULLSCALE=1. Advantage is that it also works on the Pi4, if you ever need to switch for some reason. Would that work for you?

Yes, we now moved to something similiar. Since we only need gl.ortho and other stuff to create different coordinate systems, like one where the screen goes from -1 to 1 in both axes, we will create a set of functions that initialize a given coord system. Within these functions we can take care of the correct viewport scaling as well. This helps keeping the stuff relatively compact and easy to use.

Thanks for your help!

info-beamer - Digital Signage for the Raspberry Pi community forum - Imprint