Giter VIP home page Giter VIP logo

draylib's Introduction

Port of Raylib to D

This is a WIP port of raylib to the D programming language.

This includes the v4.0.0 source of raylib from C, which will be migrated piecemeal to D.

Platform support

Initially, only desktop will be supported, and likely only tested on Linux and MacOS (Windows users welcome to help!)

All #ifdef for platforms will be changed to either version(none) or version(all), with a comment for the original ifdef. Eventually, the plan is to support all the platforms.

Building

To build, first use the makefile in the raylib directory, which contains the original C code.

Then build using dub. This produces libdraylib.a. This is almost a drop-in replacement for libraylib.a, but we also are depending on BindBC_GLFW. Therefore, you need to link this library in addition to libdraylib.a.

draylib is currently built with betterC.

I haven't yet figured out how to automate the build of libBindBC_GLFW.a. My current mechanism is:

> DFLAGS="--d-version=GLFW_33" dub build bindbc-glfw --config=staticBC
> cp ~/.dub/packages/bindbc-glfw-<version>/bindbc-glfw/lib/*.a .

TODO: make this work better.

Port status

raylib.h, config.h, raymath.h, rlgl.h have all been converted automatically using dstep to the source/raylib package (note that raylib.h is converted to raylib/package.d). raylib/rcore.d will contain the ported rcore.c file. rcore.c will slowly be have all its functions removed as they are implemented in rcore.d. After rcore.c is eliminated, we will work on the next file.

Game plan

  1. Port raylib fully to D, so no C files exist for the library. The examples probably won't be ported, unless people see the need (and I won't be doing that).
  2. Turn off betterC
  3. Migrate C API to be more D-like, leaving original raylib API as a wrapper.

draylib's People

Contributors

schveiguy avatar realdoigt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.