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

Random questions about the library #24

Open
kvark opened this issue Feb 17, 2015 · 3 comments
Open

Random questions about the library #24

kvark opened this issue Feb 17, 2015 · 3 comments
Labels

Comments

@kvark
Copy link
Member

kvark commented Feb 17, 2015

  1. Why is the package named piston-gfx_texture, while the widely popular image is just named image? Do you have any guidelines on these names? I don't mind either way, just prefer consistency.
  2. What's the point of having a single source file named texture.rs if the project is gfx_texture? Why not just put the logic into lib.rs if it's so small?
  3. Why returning a struct (Texture) that has only gfx::TextureHandle instead of just returning the handle directly?
  4. Why is the error (for from_path) returned as String? I believe you should have proper enums for errors, no unwrap() calls in the body, and Display with Debug implemented for the errors.
@kvark kvark added the question label Feb 17, 2015
@bvssvni
Copy link
Member

bvssvni commented Feb 17, 2015

  1. I think my line of reasoning was that 2D libraries were prefixed piston2d and 3D libraries piston3d, and since gfx_texture was used for both I used just piston. See Reserve names on crates.io piston#768
  2. gfx_texture partly comes from Hematite, which had a source texture.rs. Historical accident.
  3. To work with piston-graphics, the Texture object needs to implement the ImageSize trait.
  4. This should be fixed.

@kvark
Copy link
Member Author

kvark commented Feb 17, 2015

Thanks! One more thing:

(5). Why aren't texture loaded with mipmaps? This is probably the most common use case, so while a configurable option is preferred, doing mipmaps by default is most desired.

@bvssvni
Copy link
Member

bvssvni commented Feb 17, 2015

@kvark That might be a good idea. Will open an issue.

This was referenced Feb 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants