Skip to content
Martín Dias edited this page Oct 12, 2023 · 8 revisions

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.

History

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:

Running

First, you should use the README's snippet to load the code in a fresh Pharo image. Then follow next subsections.

Demos with benchmarks

Browse subclasses of BenchmarkingDemo and evaluate scripts in both instance- and class-side. Open Transcript to check printed benchmark outputs.

Demos with focus on interaction

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.

Clone this wiki locally