GithubHelp home page GithubHelp logo

rsduck / cirrlicht Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danyalzia/cirrlicht

0.0 3.0 0.0 4.79 MB

C Bindings of Irrlicht Engine

License: Other

Objective-C 10.69% C++ 74.60% C 13.00% Makefile 1.71%

cirrlicht's Introduction

Only for the "unforked" repositry:

Build Status Stories in Ready

CIrrlicht - C Bindings of Irrlicht Engine

Details

CIrrlicht is the C Bindings/Interface of Irrlicht Engine which makes it possible to use Irrlicht Engine from C. The original intention of this software is to make Irrlicht cross-language by making it easy to bind Irrlicht Engine for those languages that directly support C but not C++ such as D, Haskell, Swift etc.

It is used as a backend for DIrrlicht

Status

It's in very early beta stage. Several functions still aren't wrapped. It is subject to API changes.

Checkout the Road Map for the list of things that still needs to be done.

Installation

###Linux Open Makefile and set IrrlichtHome to the root directory of Irrlicht. If you don't have Irrlicht installed already then you can simply get it through svn checkout svn://svn.code.sf.net/p/irrlicht/code/trunk irrlicht in the same directory as CIrrlicht, that way you won't have to set IrrlichtHome yourself. Please note that you need to compile Irrlicht as a static library.

To compile and install dynamic library on Linux:

$ make sharedlib
$ sudo make install

###Windows with Visual Studio Get the lastest Irrlicht Sourcecode from svn://svn.code.sf.net/p/irrlicht/code/trunk using e.g. TortoiseSVN or with git from https://github.com/zaki/irrlicht into the CIrrlicht directory. Then you must compile it. Simply open the Visual Studio Solution in [CIrrlicht folder]/irrlicht/source/ for your VS version and compile it. I only tried it with the Release Configuration which compiles an Dynamic Library, but an the Release Static configuration should also work.

Now you must open the Visual Studio Solution in the windows folder and compile it. When it's compiling done, you will your find .dll and .lib files in the bin folder

Usage

CIrrlicht is based on Irrlicht which separates the interface from implementation, which means every method of base class must be implementated as separate functions instead of casting pointer to base class. Following is the short example that can be used to test CIrrlicht, it shows the simple window with a black background that can be minimized, resized and closed:


#include <cirrlicht.h>

int main() {
    irr_IrrlichtDevice* device = irr_createDevice(EDT_OPENGL, 800, 600);
    
    irr_IrrlichtDevice_setWindowCaption(device, L"CIrrlicht Test!");
    irr_IrrlichtDevice_setResizable(device, true);
    
    irr_IVideoDriver* driver = irr_IrrlichtDevice_getVideoDriver(device);
    while(irr_IrrlichtDevice_run(device)) {
        irr_IVideoDriver_beginScene(driver);
        irr_IVideoDriver_endScene(driver);
    }
    
    irr_IrrlichtDevice_drop(device);
}

See wiki for more usage and tutorials

Contributing

CIrrlicht is currently being used as a backend for DIrrlicht, that means the quality of DIrrlicht is highly dependent on it. The priority is to make the library stable enough that doesn't break DIrrlicht. Feel free to open issues or send pull requests.

Before making a commit, please try to adhere to the coding style of CIrrlicht.

License

It is released under permissive zlib license same as Irrlicht Engine.

cirrlicht's People

Contributors

danyalzia avatar rsduck avatar waffle-iron avatar

Watchers

 avatar  avatar  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.