Hi,
...
> SDL executes all graphics commands right away
...
> Do similar graphic libraries exist for Scala?
I don't think anything Scala specific exists. But - keep in mind you
can use any Java library with Scala and people are successfully doing
it this way, for example you could use SDLJava (although it isn't
updated for quite some time).
I'm not sure this will be what you want, but I'd go with libgdx
anyway. I know that
http://libgdx.badlogicgames.com/ works with Scala,
it is not only for games, you can make any type of interactive
graphical 2d/3d app in it - as an extra profit, your code will be more
portable - including Android, and who knows - maybe iOS soon? They
already offer official support for libgdx (Java) code on iOS (trough
IKVM+Mono.Touch currently, but they have Google SoC projects for
RoboVM and Avian), it most likely will mean that as soon as Scala will
work on IKVM/Avian/RoboVM on iOS you will be able to port your app
there in a snap, including access to iOS specific API. Also it's easy
to start up with it because there is g8 template for SBT project set
up for scala/libgdx/Win/Lin/Mac/Android development -
https://github.com/ajhager/libgdx-sbt-project.g8 - you can even check
some games made with Scala for PC & Android - like
https://github.com/tlazaro/scala-metagun - a PORT of game made by
MineCraft author in single weekend for Ludum Dare
http://www.mojang.com/compo/metagun/ (he used Java+LibGDX combo, but
Scala+LibGDX works just as well). It's best to see a complete running
example and decide if this is what you need - like
https://github.com/tlazaro/scala-metagun/blob/master/common/src/main/scala/com/mojang/metagun/screen/TitleScreen.scala
- you update object in tick method and render it in render method, you
still need to keep some information, but it isn't "graphics objects",
only stuff like positions of objects in world, etc (the spriteBatch
call isn't obligatory here, it's just for optimization to not send a
lot of small requests to GFX card, because it's slower. It allows you
to prepare a batch of any size and send it at once, but it is you who
decides if and when to use it - you can also make multiple batches and
stuff like that). Library takes care for the rest. I don't know if you
will get anything closer to what you want, at least I'm not aware
about anything closer.
Also, it all depends on what is your final goal. You aim for more
game-like experience where your application will be single, usually
full-screen window without decoration and OS styled components? Or
maybe you want to do something more like graphics editor, where you
not only have single window but mix graphics and standard OS elements
like status bar, RMB menu with cut/copy/paste, top menu, toolbar, etc?
If you are more into game-like experience or want to be cross platform
to Android, I'd really recommend libgdx. If you aim for more
editor-like experience, I'd go with learning OpenGL and use it
directly or for example inside Swing trough JOGL.
Hope it helps,
Andrzej.