A Common Lisp framework for the creation of electronic art, visual design, game prototyping, game making, computer graphics, exploration of human-computer interaction, and more.
Refactor to reduce code duplication, fix possible flickering / artifacts when resizing / recompiling defsketch.
Note: initialization order was changed:
view-matrix and axis-sgn are being set a little bit later;
kit.gl.shader:uniform-matrix and gl:viewport are called from kit.sdl2:render method, when the viewport should be updated, which is every time after the initialize-view-matrix function is called. (It is called on the first rendering and then every time width / height / y-axis slots are changed or a :size-changed event is sent)
Also when the :size-changed event is handled the window is immediately re-rendered to avoid flickering too much. (Some flickering is still in place, unfortunately.)
Please review these changes, as I'm not sure it doesn't break anything -- although small tests and examples do run.
Refactor to reduce code duplication, fix possible flickering / artifacts when resizing / recompiling defsketch.
Note: initialization order was changed:
view-matrix
andaxis-sgn
are being set a little bit later;kit.gl.shader:uniform-matrix
andgl:viewport
are called fromkit.sdl2:render
method, when the viewport should be updated, which is every time after theinitialize-view-matrix
function is called. (It is called on the first rendering and then every time width / height / y-axis slots are changed or a:size-changed
event is sent)Also when the
:size-changed
event is handled the window is immediately re-rendered to avoid flickering too much. (Some flickering is still in place, unfortunately.)Please review these changes, as I'm not sure it doesn't break anything -- although small tests and examples do run.