elarnon / ocsfml Goto Github PK
View Code? Open in Web Editor NEWThis project forked from joedralliam/ocsfml
Ocaml port of the C++ SFML library.
Home Page: http://ocsfml.forge.ocamlcore.org/
License: zlib License
This project forked from joedralliam/ocsfml
Ocaml port of the C++ SFML library.
Home Page: http://ocsfml.forge.ocamlcore.org/
License: zlib License
Ocsfml - an OCaml port of the C++ SFML library (version >= 2.0) Require : - SFML >= 2.0 - OCaml >= 3.12 - cmake >= 2.8 - findlib >= 1.2.7 - a C++ compiler having a minimal support of C++11 (Tested with : Linux : - gcc 4.6.1 - clang 2.9 OS X (10.7) : - gcc 4.5 - clang 2.9 Windows : - VC++ 10 ) - boost - flexlink (only on Windows) Install : 1) Configuration The configuration tool is cmake. When running cmake ocamlc must in the PATH environment variable. Following instructions will assume that you are in the cmake build directory. 2) Compiling and installing Ocsfml Ocsfml use a preprocessor library (external_cpp) to facilitate C++/OCaml binding. Thus, you must first compile and install it; then you could compile ocsfml itself. Target to build are (in the same order) : * external_cpp * install_external_cpp * all * install For instance : - With make : make external_cpp sudo make install_external_cpp make sudo make install - With nmake : nmake external_cpp nmake install_external_cpp nmake nmake install 3) Compiling and installing the tests [optional] You may want to tests Ocsfml. Build the targets 'tests' and 'install_tests'. Native and byte-code executable should be installed in CMAKE_INSTALL_PREFIX/share/Ocsfml/Test (on Unix) or CMAKE_INSTALL_PREFIX/Ocsfml/Test (on Windows) 4) Using Ocsfml in Ocaml top-level Ocsfml may be used in the ocaml top-level : #use "topfind" ;; #require "ocsfml.graphics" ;; open OcsfmlWindow ;; open OcsfmlGraphics ;; let vm = VideoMode.({width = 400 ; height = 400 ; bits_per_pixel = 32 }) ;; let app = new render_window vm "Ocsfml Window" ;; let shape = mk_circle_shape ~radius:50. ~fill_color:Color.yellow ~outline_color:Color.blue ~outline_thickness:10. ~position:(100., 100.) ();; app#clear () ;; app#draw shape ;; app#display () ;; 5) Integrating Ocsfml in Ocamlbuild toolchain Add '-use-ocamlfind' flag when invoking ocamlbuild. In your _tags file, specify package( ocsfml.LLL ) with LLL the lower-case name of one of the SFML module (system, window, graphics, audio or network)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.