Equalizer logo
Collage logo
GPU-SD logo

Fixed Aspect Ratio

Author: [email protected]
State: Implemented in 0.4.

Overview

This features adds support for resizing windows without changing the aspect ratio of the OpenGL rendering in order to avoid the distortion of the model. Upon the size change of the associated channel, the horizontal or vertical field of view (FOV) of the wall or projection description is updated so that rendering is not 'stretched'.

Implementation

Modify the wall's width or height or the projection's horizontal or vertical field of view upon a channel pixel viewport size change. Upon Compound::setChannel, the compound subscribes to the channel viewport change notification. Add PixelViewportListener 'interface' and channel PVPListener add/remove/notify API. Refactor the existing window/channel size notifications to use new listener API.

Retain the initial pvp in the compound upon the first channel pvp notification. Upon subsequent pvp notifications, compute the relative change to the initial value and adapt wall or projection accordingly. Applying the change using the original wall or projection is necessary to eliminate the accumulation of rounding errors if incremental updates would be used.

API

    class PixelViewportListener
    {
        virtual void notifyPVPChanged( const eq::PixelViewport& pvp ) {}
    }
    class Compound : public PixelViewportListener
    { ... }

File Format

    global
    {
        EQ_COMPOUND_IATTR_UPDATE_FOV     HORIZONTAL [ON] | VERTICAL | BOTH | OFF
    }
    compound
    {
        attributes
        {
            update_FOV                   HORIZONTAL [ON] | VERTICAL | BOTH | OFF
        }
    }

Restrictions

The BOTH strategy will be implemented later.

Open Issues

None