Can I use Cubemaps with Rust and OpenGL?


#1

I would like to use Rust for a computer graphics assignmet which involves cubemaps. As I understand glium does not support cubemaps yet: https://github.com/tomaka/glium/issues/644.

What are my options here? Can I use somethig more higher level then https://github.com/bjz/gl-rs for supporting cubemaps?


#2

You may want to look at gfx-rs, which is basically safer and more sane OpenGL bindings (it’s actually more general, but that’s an other topic). It does have a Cube texture type, so I assume that it’s supported, but I haven’t tested. It’s a quite nice library, anyway.


#4

Turns out glium has a unsafe back door for executing arbitrary OpenGL calls.

Half a night’s gone, and I’m done https://github.com/matklad/bunny/blob/26e79775092bb3b066d3f2fef5259ad14313d3df/src/main.rs#L133-L162 :smile: