Hey guys,

I was wondering if anybody had issues with getting the right ViewPort size
when dealing with a custom layout in XSI?

We found that it would return the size of one of the 4 viewports even
though it would be maximized or resized. 1  or 2 workaround was to either
switch the layout and come back to the custom one, or go in Layout Edit
mode and exit. It might have triggered a refresh of some sort. The custom
layouts are nothing fancy.

Anyhow, a suitable workaround turn out to be using OpenGL itself (thanks
Christian):

Area viewportArea;
        GLint viewport[4];
        glGetIntegerv(GL_VIEWPORT, viewport);

        viewportArea.offsetX = CValue(viewport[0]);
        viewportArea.offsetY = CValue(viewport[1]);
        viewportArea.sizeX = CValue(viewport[2]);
        viewportArea.sizeY = CValue(viewport[3]);

.. but still wondering if it's a known issue or should send a repro case.

Cheers
-- 
Xavier

Reply via email to