Copyleft Games

Intro to OpenGL

This beginner task introduces you to writing OpenGL using Rust. This will take a few hours but by the end you should be ready to tackle harder OpenGL tasks.

Start with installing Rust, Cargo, and Mercurial (hg) if you've not already done so. See and for how to do this.

Next clone the base Rust OpenGL code using "hg clone" and see if you can compile it using "cargo build". Run target/debug/intro_opengl to open a window that fades from blue to pink.

From here use this guide on Youtube made by another Google Code-in student to render triangles to make a design. As always, you're encouraged to seek help from mentors and other students on webchat when you get stuck. We expect you'll need help.

Create a design using at least 3 differently-colored triangles. A holiday tree made of different greens, a sailboat, a face, or anything your imagination desires - just don't copy another student's design!

For "extra credit", show a basic understanding of matrix math by animating the MVP matrix (Model-View-Projection) to spin the camera around your design. A GCI student made this tutorial on shaders to help.

To submit your work, commit it using "hg commit" and upload a "hg bundle" file to this task. Zipfiles cannot be accepted, we need to see your changes!

Task tags

  • rust
  • opengl

Students who completed this task

Zuriel, KRampalli, quiet, Jonathan BolaƱos, wxiuxuan, Nalin CRYPTIC

Task type

  • code Code
  • web Design
  • assessment Outreach / Research