Canvas development: Difference between revisions

Jump to navigation Jump to search
Line 1,378: Line 1,378:
In mid 2016, a number of contributors discussed another workaround to use Canvas textures in conjunction with effects/shaders: simply, by allowing an arbitrary Canvas to be registered as a '''material''' via SGMaterialLib, e.g. using an API in the form of <code>myCanvas.registerMaterial(name: "myCanvasMaterial");</code>
In mid 2016, a number of contributors discussed another workaround to use Canvas textures in conjunction with effects/shaders: simply, by allowing an arbitrary Canvas to be registered as a '''material''' via SGMaterialLib, e.g. using an API in the form of <code>myCanvas.registerMaterial(name: "myCanvasMaterial");</code>


Equally, materials would make it possible to easily use arbitrary effects and shaders per Canvas element:  
Equally, materials would make it possible to easily use arbitrary effects and shaders per Canvas element, i.e. just by setting a few properties that are then processed by a Canvas::Element helper function:


<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">

Navigation menu