GithubHelp home page GithubHelp logo

games101_with_rust's Introduction

用 Rust 重温 GAMES101

GAMES101-现代计算机图形学入门-闫令琪

这个框架是非官方的,你可以用这个作业框架来用 Rust 写作业当练习。代码在各个 assignmentX 文件夹中,其中 todo!() 是作业需要写代码的地方。

代码和原本作业框架的差别是:这个框架摆脱了 OpenCV 的依赖,也没有使用 SDL2 库,Windows 下安装基本的 Rust 环境后能直接运行。

窗口库使用 emoon/rust_minifb,支持 macOS, Linux and Windows (64-bit and 32-bit)。

我的作业实现在 examples 文件夹下,你可以运行 cargo run --example hw1 来执行窗口,或 cargo r --example hw1 -- -r 0 output.png 来生成图像。

开写作业!

安装 Rust.

git clone https://github.com/latias94/games101_with_rust
cd games101_with_rust
# 写作业1,修改 assignment1/main.rs,用你的代码替换 `todo!()` 宏
cargo r --bin assignment1 -r # 执行程序,-r 指 release mode
cargo r --bin assignment1 -- -r 0 output.png # 生成图像

Linux

Linux 需要安装窗口库需要的依赖:

sudo apt install libxkbcommon-dev libwayland-cursor0 libwayland-dev

TODO

  • 剩余作业

games101_with_rust's People

Contributors

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