Re: Checking In, Vulkan
Richard Harrison <[email protected]> Fri, 31 Jul 2026 10:14:28 +0200
| Newsgroups | gmane.games.flightgear.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============1113925885125993378==
Content-Type: multipart/alternative;
boundary="------------fGnbfJsfLed3yIqi9A23br87"
Content-Language: en-US
This is a multi-part message in MIME format.
--------------fGnbfJsfLed3yIqi9A23br87
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
On 27/07/2026 10:46, James Turner wrote:
> I would strongly suggest using Bevy for this, and not starting from
> scratch. Bevy is nicely modular (use what you want, not all of it),
> has great glTF support, PBR support and supports all WGPU backends
> which means Vulkan but also Metal and D3D.
>
I've used Bevy to create a standalone testbed for some of my work; it
uses procedurally generated terrain and it's up and running in a moment.
Probably I spent a few weeks getting it to work - mostly as an exercise
in Bevy. Getting a model loaded and animated using glTF was an
afternoon's work
> There’s just one catch - it’s in Rust :)
Hey, steady on there. Something being in Rust is usually a good thing;
in the last 12 months I've done a lot of stuff in Rust and really like it.
Top things I like about Rust
1. What they call fearless concurrency [1] which so far works great and
my multithreaded code works and doesn't race.
2. The ownership model, the memory safety, generally the knowledge that
the compile is going to kill 99% of all known footguns. This is
really the same as (1)
3. Cargo - the package manager, the build system, the testing.
4. Traits and composition (mostly) lead to cleaner code; generally I
haven't felt restricted by the lack of the C++ object model; and not
having to design an object hierarchy is quite frankly a bit of a relief.
5. The integrated testing that is part of the language (see (3) above)
Of course there are huge annoyances and frustration as you get used to
how the borrow checker works but it's worth it to not have to spend
hours trying to fix a concurrency issue, track down a dangling pointer,
fix a memory leak, tracking down heisenbugs, etc.
> But, good news, you can link C++ and Rust code together!
Having done this I do have to say that it usually isn't very easy, but
given that the alternative is rewriting FlightGear in Rust I guess
linking C++ and Rust becomes simple by comparison.
-----
[1] https://doc.rust-lang.org/book/ch16-00-concurrency.html
wip pictures:
https://chateau-logic.com/sites/default/files/aO92zZT0jOILLLF0.jpg
https://chateau-logic.com/sites/default/files/bU6BDykb1O2r70Ey.jpg
--------------fGnbfJsfLed3yIqi9A23br87
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 27/07/2026 10:46, James Turner
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:[email protected]">
<div>I would strongly suggest using Bevy for this, and not
starting from scratch. Bevy is nicely modular (use what you
want, not all of it), has great glTF support, PBR support and
supports all WGPU backends which means Vulkan but also Metal and
D3D.</div>
<div><br>
</div>
</blockquote>
<p>I've used Bevy to create a standalone testbed for some of my
work; it uses procedurally generated terrain and it's up and
running in a moment. Probably I spent a few weeks getting it to
work - mostly as an exercise in Bevy. Getting a model loaded and
animated using glTF was an afternoon's work</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:[email protected]">
<div>There’s just one catch - it’s in Rust :)</div>
</blockquote>
<p>Hey, steady on there. Something being in Rust is usually a good
thing; in the last 12 months I've done a lot of stuff in Rust and
really like it.</p>
<p>Top things I like about Rust</p>
<ol>
<li>What they call fearless concurrency [1] which so far works
great and my multithreaded code works and doesn't race.</li>
<li>The ownership model, the memory safety, generally the
knowledge that the compile is going to kill 99% of all known
footguns. This is really the same as (1)</li>
<li>Cargo - the package manager, the build system, the testing.</li>
<li>Traits and composition (mostly) lead to cleaner code;
generally I haven't felt restricted by the lack of the C++
object model; and not having to design an object hierarchy is
quite frankly a bit of a relief.</li>
<li>The integrated testing that is part of the language (see (3)
above)</li>
</ol>
<p>Of course there are huge annoyances and frustration as you get
used to how the borrow checker works but it's worth it to not have
to spend hours trying to fix a concurrency issue, track down a
dangling pointer, fix a memory leak, tracking down heisenbugs,
etc.</p>
<blockquote type="cite"
cite="mid:[email protected]">
<div>But, good news, you can link C++ and Rust code together!</div>
</blockquote>
<p>Having done this I do have to say that it usually isn't very
easy, but given that the alternative is rewriting FlightGear in
Rust I guess linking C++ and Rust becomes simple by comparison.</p>
<p>-----</p>
<p>[1] <a class="moz-txt-link-freetext"
href="https://doc.rust-lang.org/book/ch16-00-concurrency.html"
moz-do-not-send="true">https://doc.rust-lang.org/book/ch16-00-concurrency.html</a></p>
<p>wip
pictures: <a class="moz-txt-link-freetext" href="https://chateau-logic.com/sites/default/files/aO92zZT0jOILLLF0.jpg">https://chateau-logic.com/sites/default/files/aO92zZT0jOILLLF0.jpg</a>
<a class="moz-txt-link-freetext" href="https://chateau-logic.com/sites/default/files/bU6BDykb1O2r70Ey.jpg">https://chateau-logic.com/sites/default/files/bU6BDykb1O2r70Ey.jpg</a></p>
<p><br>
</p>
</body>
</html>
--------------fGnbfJsfLed3yIqi9A23br87--
--===============1113925885125993378==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============1113925885125993378==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel
--===============1113925885125993378==--