-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the pharo-sdl-experiments wiki.
This repository has a collection of experiments around "layer composition" in Pharo FFI bindings to SDL2 library. The 'SDLExperiments-FFI' package contains improvements to regular Pharo 11's SDL2 bindings.
As a reference, members of "lse-openbloc" mailing-list can read "Tests with SDL2 atlas" thread (beginning of 2023), as well as "Drag and drop between OS windows" thread. Some videos from those threads:
- https://www.youtube.com/watch?v=S9hbx0-SOTg
- https://www.youtube.com/watch?v=t2Csc47EcpE
- https://www.youtube.com/watch?v=kbXim5OY9sQ
- https://www.youtube.com/watch?v=1j-0T3HVcFY
- https://www.youtube.com/watch?v=m0fpCBOM3bU
First, you should use the README's snippet to load the code in a fresh Pharo image. Then follow next subsections.
Browse subclasses of BenchmarkingDemo
and evaluate scripts in both instance- and class-side. Open Transcript to check printed benchmark outputs.
In a bash-like command-line, do any of:
SceneDragAndDropDemo: ./pharo Pharo.image eval --no-quit "SceneDragAndDropDemo new open"
and draw with your mouse cursor the square from a window to another. They key of this demo is doing a proof-of-concept of custom cursors in a drag&drop scenario between OS windows, multi-platform.
ScenePositionDemo: ./pharo Pharo.image eval --no-quit "ScenePositionDemo new open"
and use the arrow keys and mouse wheel to move the square with sub-pixel precision. There are extra options to start the window with a non-default SDL2 backend, to see variations in your system. The key of this demo is doing a proof-of-concept of how do look of SDL_Textures on sub-pixel copy (it can look bad).
You can use control+q to quit the process.