PistonDevelopers / hematite

A simple Minecraft written in Rust with the Piston game engine
http://hematite.piston.rs/
MIT License
1.86k stars 105 forks source link

Upgrade to modern gfx-rs, using PSOs #260

Closed mattico closed 8 years ago

mattico commented 8 years ago

I've just started working on this (again) so it's not nearly done. I'm mostly just putting this up so that I don't forget about it again :)

Is there a reason to not use tilde/caret requirements in Cargo.toml? Cargo.lock is checked in so you still need to explicitly cargo update for anything to change.

Closes #214

bvssvni commented 8 years ago

Cargo interpretates "0.8.0" as "^0.8.0".

mattico commented 8 years ago

Wow, I feel like I should have figured that out by now.

mattico commented 8 years ago

That's all for today. I think it's mostly complete, if not mostly correct. Black screen for now, but it builds and there's no crashes.

mattico commented 8 years ago

It works! \o/

Except for this one triangle... hematite and mouselook. I think something changed in camera_controllers?

mattico commented 8 years ago

Fixed the missing triangle. ~~I think the mouse problem is because glutin_window doesn't implement MouseRelative/glutin has broken mouse grabbing. See: https://github.com/PistonDevelopers/glutin_window/issues/72 https://github.com/tomaka/glutin/issues/696~~

Turns out I was right the first time. glutin_window doesn't implement MouseRelative. But after fixing that it still doesn't work, despite the events propagating correctly.

mattico commented 8 years ago

Also worth investigating: this version gets ~250fps while master gets ~500fps on my machine. Probably doing something wrong with the vbuffer or with encoder.reset()

toqueteos commented 8 years ago

Congrats @mattico! You are doing awesome work here :+1:

mattico commented 8 years ago

Alright, everything works now. Performance also seems to be better with the sdl2 window. I'll squash these commits before merging.

The changes seem pretty straightforward, but I'd like at least one other opinion before I pull the trigger.

bvssvni commented 8 years ago

Looks good!

mattico commented 8 years ago

Of course I remember this right after I hit the merge button...

Since we're still using SDL, I shouldn't remove the part of the README that has SDL stuff in it.