MeVisLab Resolution Independence API
|
High-resolution displays provide a rich visual experience, allowing users to see sharper text and more details in images than on standard-resolution displays. MeVisLab supports OpenGL rendering on high-resolution displays without scarifying readability due to small fonts, shrunken margins or thin lines.
OpenGL visualization modules do not support resolution independence out-of-the box, they must be adapted to it. MeVisLab extends the OpenGL render state by a pixel scale factor that facilitates this task a great deal. Just replace the standard OpenGL calls glLineWidth, glPointSize, and glLineStipple for their new counterparts ml::glLineWidthScaled, ml::glPointSizeScaled, and ml::glLineStippleScaled. Fonts will be adapted automatically. For margins and spacing use the template GLHiDPIScale. The following code snippet outlines some of the adaptations:
Using the SoShader framework, the following uniform can be accessed within the shader code:
uniform float oiv_DevicePixelRatio;