[vtk-developers] Scissor in vtkOpenGLCamera

Aashish Chaudhary aashish.chaudhary at kitware.com
Thu Oct 29 15:23:18 EDT 2015


On Thu, Oct 29, 2015 at 3:15 PM, Antonella Cascitelli <lenlen1982 at gmail.com>
wrote:

> Thank you, but I'm trying to render only a smaller part of image instead
> the whole image to save computational time.
>

If that's the case, why not have a smaller viewport? I may be missing
something here.


> I have just modified vtkOpenGLCamera the call to glScissor with my custom
> arguments and It works... is it possible to expose a patch that allow a
> custom glScissor setting? What I have done is a dirty workaround, which
> would be the right class to add this new public method?
>

Hmm..not sure if that would be easy unless we just add an API to the
vtkOpenGLCamera. I would be okay with the later option but wondering what
others has to say on this.

- Aashish


>
> 2015-10-29 19:52 GMT+01:00 Aashish Chaudhary <
> aashish.chaudhary at kitware.com>:
>
>> You can achieve this by creating two renderers and then for the second
>> one just a smaller viewport (on top of the first one). I am assuming that
>> you are showing two images / data at the same time.
>>
>> There is no API (as far as I know) to help you with this task.
>>
>> On Thu, Oct 29, 2015 at 2:45 PM, Antonella Cascitelli <
>> lenlen1982 at gmail.com> wrote:
>>
>>> Hi,
>>> is it possible set the glScissor in vtk?
>>> i.e. in vtkOpenGLCamera:
>>>
>>> glViewport(lowerLeft[0], lowerLeft[1], usize, vsize);
>>> glEnable(GL_SCISSOR_TEST);
>>> glScissor(lowerLeft[0], lowerLeft[1], usize, vsize);
>>>
>>> so seems that the scissor area is always the same of the viewport.
>>> I want to render only a small rectangle area in the viewport like using
>>> scissor with opengl.
>>>
>>> Thanks
>>>
>>> Antonella
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Search the list archives at:
>>> http://markmail.org/search/?q=vtk-developers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/vtk-developers
>>>
>>>
>>>
>>
>>
>> --
>>
>>
>>
>> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.
>> *
>> *| http://www.kitware.com/company/team/chaudhary.html
>> <http://www.kitware.com/company/team/chaudhary.html>*
>>
>
>


-- 



*| Aashish Chaudhary | Technical Leader         | Kitware Inc.            *
*| http://www.kitware.com/company/team/chaudhary.html
<http://www.kitware.com/company/team/chaudhary.html>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20151029/313f82ad/attachment-0001.html>


More information about the vtk-developers mailing list