All Projects → regb → Scalanative Graphics Bindings

regb / Scalanative Graphics Bindings

Licence: mit
OpenGL and SDL2 bindings for Scala Native

Programming Languages

scala
5932 projects

Labels

Projects that are alternatives of or similar to Scalanative Graphics Bindings

Ionengine
3D graphics engine designed for rapid prototyping and extensibility
Stars: ✭ 25 (-16.67%)
Mutual labels:  opengl
Tess Opt
Demonstration of how we can use tessellation shaders to make faster fragment shaders.
Stars: ✭ 13 (-56.67%)
Mutual labels:  opengl
Gli
jvm gli
Stars: ✭ 21 (-30%)
Mutual labels:  opengl
Frag.exe
Multiplayer First-Person Shooter written in C++ using my own engine, Qor
Stars: ✭ 8 (-73.33%)
Mutual labels:  opengl
Oitdemo
Order Independent Transparency Demo
Stars: ✭ 10 (-66.67%)
Mutual labels:  opengl
Glumpy
Python+Numpy+OpenGL: fast, scalable and beautiful scientific visualization
Stars: ✭ 882 (+2840%)
Mutual labels:  opengl
Arcade
Easy to use Python library for creating 2D arcade games.
Stars: ✭ 928 (+2993.33%)
Mutual labels:  opengl
Dotfeather
A closs-platform generic gameengine built on C#/.NET Standard 2.1
Stars: ✭ 28 (-6.67%)
Mutual labels:  opengl
Q3dobserver
Multi-platform C++11 library based on Qt for creating 3D viewer widgets
Stars: ✭ 13 (-56.67%)
Mutual labels:  opengl
Metalpetal
A GPU accelerated image and video processing framework built on Metal.
Stars: ✭ 907 (+2923.33%)
Mutual labels:  opengl
Fimbulclient
Open source Ragnarök Online client in C++
Stars: ✭ 8 (-73.33%)
Mutual labels:  opengl
Kepler3d
OpenGL and C++14 game engine that loads glTF 2.0
Stars: ✭ 9 (-70%)
Mutual labels:  opengl
Opengl Seed
⚪🌱A modern OpenGL starter repo that you could use to get the ball rolling.
Stars: ✭ 20 (-33.33%)
Mutual labels:  opengl
Zemeroth
😠⚔️😈 A minimalistic 2D turn-based tactical game in Rust
Stars: ✭ 940 (+3033.33%)
Mutual labels:  opengl
Alacritty
Alacritty is a modern terminal emulator that comes with sensible defaults, but allows for extensive configuration. By integrating with other applications, rather than reimplementing their functionality, it manages to provide a flexible set of features with high performance. The supported platforms currently consist of BSD, Linux, macOS and Windows.
Stars: ✭ 36,273 (+120810%)
Mutual labels:  opengl
Mesh Subdivision
A collection of common mesh subdivision algorithms
Stars: ✭ 25 (-16.67%)
Mutual labels:  opengl
Omgl
Pythonic OpenGL Bindings
Stars: ✭ 13 (-56.67%)
Mutual labels:  opengl
Satellitesimulator
🚀 A simple Qt/OpenGL satellite orbit simulator
Stars: ✭ 28 (-6.67%)
Mutual labels:  opengl
Imac Tower Defense
OpenGl 4.4 game made with Entity Component System
Stars: ✭ 28 (-6.67%)
Mutual labels:  opengl
Sidecar
Some old C++ code I developed while at MIT. Could be useful if you have an old radar lying around.
Stars: ✭ 20 (-33.33%)
Mutual labels:  opengl

Graphics Bindings for Scala Native

This repository hosts Scala Native bindings to the popular graphics programming libraries SDL2 and OpenGL. With these, you can develop high-performing graphical software, such as games, in your favorite language.

The bindings are designed to reproduce as much as possible the original programming interface in C. In particular, they won't hide Scala Native interoperability types behind regular Scala types. These bindings are only meant to provide access to these libraries for pure Scala Native projects. As such, they expose the low-level details of the underlying API and they might not be suitable for use in platforms that are not supported by Scala Native. If you are looking for a truly cross-platform solution, the ScalaGL project aims to provide a cross-platform (Native, JS, JVM) OpenGL wrapper. Alternatively, The Scala Game Library is a complete 2D Scala game engine with cross-platform support, which uses the SDL2 and OpenGL bindings for its Scala Native backend implementation.

To get started, have a look at the examples folder containing runnable demo projects. They demonstrate how to use the different librairies and extensions.

SDL2

Add this to your build.sbt:

libraryDependencies += "com.regblanc" %%% "native-sdl2" % "0.1"

The bindings export most of SDL2 standard functionalities. Importing

import sdl2.SDL._
import sdl2.Extras._

is pretty much equivalent to

#include "SDL.h"

SDL2 extensions can be provided as separate dependencies. Currently, we have an implementation of SDL2_image and SDL_ttf, which can be included in your project with:

libraryDependencies += "com.regblanc" %%% "native-sdl2-image" % "0.1"
libraryDependencies += "com.regblanc" %%% "native-sdl2-ttf" % "0.1"

For more documentation, you should refer to the official documentation of SDL, as the bindings maintain almost the exact same interface.

OpenGL

OpenGL functions up to 4.6 are exported.

Add this to your build.sbt:

libraryDependencies += "com.regblanc" %%% "native-opengl" % "0.1"

You will also need to add an additional linking option, which will vary depending on your system. For Linux, add the following to your project:

  nativeLinkingOptions += "-lGL"

And for OSX, add the following instead:

  nativeLinkingOptions ++= Seq("-framework", "OpenGL")

The bindings export all of the OpenGL standard up to 4.6. Importing

import opengl.GL._
import opengl.Extras._

will bring all of the standard functions and definitions of OpenGL.

For more documentation, you should refer to the official documentation of OpenGL, as the bindings maintain almost the exact same interface.

OpenGL ES

Coming soon..

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].