three-d icon indicating copy to clipboard operation
three-d copied to clipboard

Update `winit` dependency

Open Bobrokus opened this issue 11 months ago • 5 comments

I might be missing something but I can't use three-d with winit. When I pass winit::window::Window to WindowContext::from_winit_window() I get an error stating that the parameter type has the same name but it's a different type, and may be caused due to different versions of packages being used.

Bobrokus avatar Jan 22 '25 21:01 Bobrokus

I have had that error many times and it's often due to different versions of crates, the winit version used by you have to be exactly the same as the version used by three-d. Could also be that you're trying to pass the three-d window instead of a winit window.

asny avatar Feb 03 '25 08:02 asny

I have had that error many times and it's often due to different versions of crates, the winit version used by you have to be exactly the same as the version used by three-d. Could also be that you're trying to pass the three-d window instead of a winit window.

Yes, it is caused by different crate versions, but I wanted to make the issue more general, that's why I didn't mention it. Do you plan updating the version?

Bobrokus avatar Feb 03 '25 09:02 Bobrokus

Aha, so you wanted the dependency updated, that makes sense 👍 Feel free to make a PR if you have the time, I don't have a lot of time at the moment.

I fail to understand what you mean about a more general issue. Yeah, you'll have to use the same version, but there's hardly anything I can do about it. Alternatively you can create the context from the winit window yourself, it's not a lot of code.

asny avatar Feb 24 '25 07:02 asny

Aha, so you wanted the dependency updated, that makes sense 👍 Feel free to make a PR if you have the time, I don't have a lot of time at the moment.

I fail to understand what you mean about a more general issue. Yeah, you'll have to use the same version, but there's hardly anything I can do about it. Alternatively you can create the context from the winit window yourself, it's not a lot of code.

Sorry, I wasn't exactly sure if it was caused by version mismatch specifically so I made the issue sound more general, if you get what I mean. Anyways, I'll look into it and possibly open a PR 😁

Bobrokus avatar Feb 24 '25 08:02 Bobrokus

Sorry, I wasn't exactly sure if it was caused by version mismatch specifically so I made the issue sound more general, if you get what I mean.

No problem at all, I think I understand what you mean now 🙂

Anyways, I'll look into it and possibly open a PR 😁

Thank you, I would very much appreciate that 🙏

asny avatar Feb 24 '25 08:02 asny