Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sudoku: GlyphCache error #181

Open
observant2 opened this issue Oct 8, 2017 · 3 comments
Open

Sudoku: GlyphCache error #181

observant2 opened this issue Oct 8, 2017 · 3 comments

Comments

@observant2
Copy link

In the tutorial it says to import opengl_graphics::glyph_cache::GlyphCache. This doesn't seem to exist anymore. What exists instead is opengl_graphics::GlyphCache.

Also the constructor of GlyphCache takes three arguments instead of two. There is a factory needed.

How can I compile the code? I cannot find anything about the factory. Also I followed the tutorial step by step.

Maybe problems like these can be solved in the future with adding versions to the dependencies. As piston seems to change very fast, specific library versions can make sure that the tutorial still works, even when newer versions of piston or any dependency came out. :-)

PS: I found opengl_graphics::graphics::glyph_cache::rusttype::GlyphCache, but it seems to be the same struct as opengl_graphics::GlyphCache.

@observant2
Copy link
Author

Okay, piston2d-opengl_graphics 0.46.0 seems to be the last version that still had opengl_graphics::glyph_cache::GlyphCache. There is no combination of dependencies that could run the last Sudoku chapter, where the font is being added. Going through the versions it looked like every week new breaking changes occur.

@Stigjb
Copy link

Stigjb commented Nov 20, 2018

It seems that this was fixed in adc06df.

@DerekCrosson
Copy link

With the latest version of piston2d-opengl_graphics (0.70.0), the app panics when running cargo run. This is the error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UnrecognizedFormat', src/libcore/result.rs:1187:5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants