Basics
Script Execution
In osl all rendering is done at runtime, during program execution. If you draw an image and then set a variable, the script will wait for the ui to be rendered before it then moves onto the next task. An example is below for how this allows you to run scripts based off of real time ui information.
This means that osl code handles all scripting and rendering simultaneously.
This also means that the order that you render elements also determines what elements are rendered on-top of other elements, since if you render an element last it will be rendered right at the front of the window.
The Draw Cursor
In osl, the next rendered ui element will always be positioned at "the draw cursor" which is a set of x y values that define where the system should render the next element. You can change and set these using draw cursor commands, as shown below.
Last updated