[vtk-developers] CommonGL idea

Steve Pieper pieper at isomics.com
Tue Jun 30 15:37:38 EDT 2015


Hi Cory -

I know there is more OpenGL2 work for VTK coming down the pipeline but I've
looked through the what is in VTK 6.2 and clearly there is a lot of logic
in the C++ code for generating and manipulating the GLSL shader code.  I
think it would be hard to meaningfully re-use the current VTK shader code
in WebGL, but I think we can write new code that works either place, or at
least that's the hypothesis.

For people wanting a concrete example, this script works with some minor
modifications to VTK (in the same wrap-shaders branch -- basically just
some extra classes wrapped for python).

https://github.com/pieper/VTK/blob/wrap-shaders/Rendering/OpenGL/Testing/Python/DynamicShader.py

The shader itself came from this source with only minor modifications:

http://glslsandbox.com/e#25816.0

-Steve

On Tue, Jun 30, 2015 at 12:51 PM, Cory Quammen <cory.quammen at kitware.com>
wrote:

> Hi Steve,
>
> How much does the OpenGL2 backend in VTK help in getting you to CommonGL?
>
> Thanks,
> Cory
>
> On Tue, Jun 30, 2015 at 10:45 AM, Steve Pieper <pieper at isomics.com> wrote:
>
>> Hi VTKers and CTKers -
>>
>> Nicolas and the XTK team [1,2] have been working on some upgrades to
>> XTK's WebGL and volume rendering and I've been helping a bit while also
>> playing with GLSL shaders in VTK.
>>
>> It seems to us that there's an opportunity to write the GLSL code in a
>> way that would be usable in both the traditional desktop and the
>> web/embedded use cases.
>>
>> Granted OpenGL != WebGL but the shaders are close enough that we think
>> it's feasible to create a resource we're calling CommonGL.
>>
>> Anyway I wrote up some notes and ideas [2] and would appreciate any
>> feedback or help.
>>
>> Best,
>> Steve
>>
>> [1] https://github.com/xtk/X
>>
>> [2] http://slicedrop.com/
>>
>> [3]
>> https://docs.google.com/document/d/1-4Up_Shq6oFTGhwXIF5DuiXUYsdIMlAC1oK7eNHWP_o/edit?usp=sharing
>>
>> _______________________________________________
>> 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
>>
>>
>>
>
>
> --
> Cory Quammen
> R&D Engineer
> Kitware, Inc.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150630/1b011ec3/attachment.html>


More information about the vtk-developers mailing list