As a pure Rust-noob I finally figured out how to open a window using glutin and gl with an animated background color
"Ye Olde Notebook" supports OpenGL 2.1 along with a decent shader support of GLSL 1.20.8. So when it came to drawing some fancy triangles I had to figure out, that lots of the older functions like glVertexPointer, glEnableClientState were deprecated and as such had been removed from the current standard.
I have to admit, that I don't really understand Rust's ecosystem around OpenGL. Please correct me, if the following findings are wrong or incomplete:
There's a crate gl whose Homepage link is dead. It seems to be an empty crate whose content should have been generated by gl_generator (when and how?) whose Homepage link is also dead. Those crates (along with khronos_api) seem to belong to a bigger Package(?)/Project(?) gl-rs.
To get started I simply included the following line into my Cargo.toml:
[dependencies]
gl = "*"
glutin = "*"
Is there a simple way to get this running with OpenGL 2.1?
Is there a ready-to-use bindings.rs of older OpenGL versions? Can I generate my own against the development System?
Thanks for any help!
ps: All this gonna be purged as soon as Vulkan kicks in
You can create your own build script in your crate and put the same code as the one you pasted in it.
Then in your main code you import the generated bindings with include!(concat!(env!("OUT_DIR"), "/bindings.rs")); for example.
As soon as I know which hardware and driver supports the whole feature set of Vulkan on both Linux and Windows, a new development workstation will be added to the shopping list.
I got it finally working. There seems to be a driver bug when combining a frustum projection, point sprites and shader computed point sizes. I worked around by using quads textured by a fragment shader:
It saves the generated bindings within my project, so my development tools are able to provide code assistance (but most time they time out due to the huge file size).