[vtk-developers] [vtkusers] HiDPI not working on VTK 7.1.0 rc2

Marcus D. Hanwell marcus.hanwell at kitware.com
Thu May 11 11:25:08 EDT 2017


On Thu, May 11, 2017 at 11:17 AM, Elvis Stansvik
<elvis.stansvik at orexplore.com> wrote:
> 2016-11-07 19:58 GMT+01:00 Sean McBride <sean at rogue-research.com>:
>> On Fri, 4 Nov 2016 14:36:56 -0400, Marcus D. Hanwell said:
>>
>>>On Fri, Nov 4, 2016 at 8:28 AM, Michael Jackson
>>><mike.jackson at bluequartz.net> wrote:
>>>> I just tried the HiDPI support on VTK 7.1.0-rc2 and I get the usual VTK
>>>> rendering canvas that is half the size of the widget that it is embedded
>>>> into.
>>>>
>>>> We are using Qt 5.6.2 on macOS 10.10.5. I compiled my original pull request
>>>> (way back in Aug 2016) and that patch gives me a full size canvas. But when
>>>> compiling the latest VTK 7.1.0-rc2 I get the half size canvas. I thought the
>>>> branch was merged on Sept 28 2016 but I guess I got busy and never actually
>>>> tested it on a retina screen.
>>>>
>>>> Most likely I am doing something wrong in the initialization in my code but
>>>> just in case can anyone else confirm with Qt 5.6.x that they can actually
>>>> get a Retina/HiDPI canvas?
>>>>
>>>Bob has a retinal Mac that I can do some testing on, this is likely to
>>>end up being after Supercomputing, but I would like to follow up on
>>>this. We had it working when you visited, and I am hoping to get this
>>>enabled in Tomviz at some point soon. It would be great to hear from
>>>Sean and/or David. To the best of my recollection an alternate
>>>approach was developed, and that was merged. It had several other
>>>changes in addition to what was proposed originally.
>>
>> We merged my PR:
>> <https://gitlab.kitware.com/vtk/vtk/merge_requests/2019>
>>
>> and not Mike's:
>> <https://gitlab.kitware.com/vtk/vtk/merge_requests/1791>
>>
>> IIRC mine was a superset of Mike's, unless we screwed something up somewhere.  I was always of the view that the changes were necessary but not sufficient.
>>
>> I'm swamped this week preparing for the SfN conference, but can look more next week...
>
> Bumping this old thread since I'm in this boat as well now.
>
> I've finally gotten around to porting our application to macOS.
> Everything went pretty smooth. We're using 7.1.1, and we're using
> QVTKWidget (will port to QVTKOpenGLWidget once 8.0.0 is out).
>
> I am however seeing the problem on a retina screen that VTK render
> windows only take up a quarter of their alotted space.
>
> So my question: Is it possible to make VTK work fine on retina
> displays with 7.1.1? If not, is there some patch I could apply? Or
> will I have to build from Git (to be 8.0.0)?
>
So I worked on some pieces of this, but may not know all the moving
parts. If you are using Qt 5 and want a retinal display application,
then you should be using QVTKOpenGLWidget. If you are using Qt 4 then
it will never work properly as Qt 4 lacks the support, or not to the
best of my knowledge. We did quite a bit of work, but it focused on
the QVTKOpenGLWidget and Qt 5, but you would need master or the 8.0
release.


More information about the vtk-developers mailing list