Giter VIP home page Giter VIP logo

sb6rust's Introduction

This is a Rust port of the OpenGL SuperBible 6th Edition sample code.

The original C++ sample code can be found at https://github.com/openglsuperbible/sb6code. The media archive used by the samples is available on the book's website http://www.openglsuperbible.com. Note that the provided Makefile will automatically download the media archive as part of the build process.

Only a small number of the C++ samples have been ported to Rust, however the supporting sample application classes are mostly complete and for the most part have a similar interface. The Rust implementation should be able to load all of the SB6 media pack models, texture and shaders.

Building the samples

  1. Make sure you have the following dependencies installed:

    • rust 1.0.0-beta3 or later
    • g++ 4.7 or later
    • GNU make 3.81 or later
    • cmake 2.8 or later
    • git
    • curl
    • unzip
  2. Build the samples: Simply build the samples by running make. This will run cargo build and copy required media files to the target/debug directory.

  3. Run the samples: cd to the target/debug directory and run the sample you want.

Building on Windows

To install the required prerequsites on Windows you can use MSYS2:

  1. Download and run the latest MSYS2 installer.

  2. From the MSYS2 terminal install the mingw64 toolchain and the other required tools.

    $ pacman -S git make unzip
    
    # Choose one based on platform:
    $ pacman -S mingw-w64-i686-cmake mingw-w64-i686-gcc
    $ pacman -S mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc
  3. Start mingw32_shell.bat or mingw64_shell.bat from your MSYS2 install (i.e. C:\msys64), depending on whether you are using 32-bit or 64-bit Rust.

You are now ready to build and run the samples.

License

The OpenGL SuperBible 6th Edition sample code is distributed under terms of the MIT license.

See LICENSE for details.

sb6rust's People

Contributors

bitshifter avatar

Watchers

 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.