Closed hannobraun closed 10 years ago
That's a nice bug report. Thanks @hannobraun!
You're welcome, @kvark, and thank you for your work on gfx-rs!
FYI, I'll not be able to look into your issue any time soon, since I'm deep in the metamorphosis, which BTW will render your issue irrelevant ;). Hope someone else can take care of it (@cmr? @bjz?).
Do you have a rough guess when the metamorphosis changes will land? I'm about to do some significant work on my project's render code, so if I'm going replace my shitty OpenGL code with gfx-rs, now's the time :)
If your timeline is a few weeks or more, I might try to fix this issue myself. If you expect to be done sooner, I might just do some other work first before tackling my render code.
@hannobraun Very roughly, metamorphosis is going to land this weekend. Plus-minus a week ;) Note, however, that the draw call syntax will not change, so if you port your app now (what is it, btw?), you'll only need minor fixes to the way device/renderer pair is created and manged, leaving the rendering itself untouched.
The device declaration is really broken. We need a better type alias to hide the render::Token
(thus, leaving no need to have extern crate render
for you). On the other hand, the metamorphosis will make that irrelevant.
You are welcome to our gitter to discuss the experience you got so far.
Very roughly, metamorphosis is going to land this weekend. Plus-minus a week ;)
Great, sounds like it's worth the wait then :)
Note, however, that the draw call syntax will not change, so if you port your app now [...], you'll only need minor fixes to the way device/renderer pair is created and manged, leaving the rendering itself untouched.
Porting now is not really an option, this issue is a showstopper. I have to work around it or debug and fix it, both of which doesn't seem so appealing, if metamorphosis isn't that far out anyway.
(what is it, btw?)
A multiplayer online game that's way too ambitious :) Website: http://vndf.de/
The device declaration is really broken. We need a better type alias to hid the render::Token (thus, leaving no need to have extern crate render for you). On the other hand, the metamorphosis will make that irrelevant.
Those have been my main complaints so far, but they are minor complaints.
You are welcome to our gitter to discuss the experience you got so far.
I'm on my way out right now, but I might show up later this week or next week. I haven't done a lot anyway so far. Set up the window, hit this bug, and that's where we are right now :) Once the metamorphosis lands, I'll attempt to port my render code. I guess I'll have more to say then.
By the way, I hang out in #rust-gamedev sometimes, usually around the afternoon (CEST).
should_finish
is never being set when the Device
is dropped. Investigating why...
Device
s destructor is never getting called O_o
Ok, this is a Rust bug.
@hannobraun: you can work around this by implementing Drop
for GfxRsContext
.
@cmr: Thanks, got it. Will try tomorrow. Out of curiosity, do you have a link to the issue?
No, still trying to make a minimal testcase.
On Wed, Aug 13, 2014 at 6:04 PM, Hanno Braun notifications@github.com wrote:
@cmr https://github.com/cmr: Thanks, got it. Will try tomorrow. Out of curiosity, do you have a link to the issue?
— Reply to this email directly or view it on GitHub https://github.com/gfx-rs/gfx-rs/issues/204#issuecomment-52118243.
@kballard discovered that, at least here, implementing Drop
causes the fields of the struct to be droppped bottom-to-top instead of top-to-bottom. My guess is that there is badness with dropping the Glfw/Window and then trying to do a swap_buffers.
@cmr I'm glad you took care of this one, I'd be totally useless here ;)
you can work around this by implementing Drop for GfxRsContext.
I can confirm that this works, both for the reduced example (https://github.com/hannobraun/gfx-rs-evaluation/commit/50aee7375d772d8b642f23ac9bfaf92dd41948fb) and my full app.
Thanks, @cmr, my evaluation of gfx-rs will resume shortly :)
It won't work for long. rustc
is getting fixed so implementing Drop
doesn't affect the order of field destruction. Instead you should simply reverse the order of field declaration on the type in question.
Closing as irrelevant as of #209
Hi everyone,
I'm currently evaluating gfx-rs for my project, but I'm having a problem: When I'm attempting to close the window, the program won't quit.
I've managed to narrow the problem down. Here's the modified triangle example. This works as expected. I'm going to show the change that causes it to exhibit the problem below.
Please note that device is not part of my context struct. As I said above, this works as expected. If I click the close button or press escape, the window closes and the program terminates.
It won't work after I make this change:
This simply adds device to the struct instead of keeping it in a separate variable. With this change, the program will no longer react if I press escape or click the close button.
When I click the close button or press escape, the following things do happen:
renderer.end_frame();
call.I have uploaded a repository that contains the example above: https://github.com/hannobraun/gfx-rs-evaluation The last commit is broken, the second-to-last is the version that works.