Alex Dixon

Gamedev, graphics, open source. Shuffling bytes and swizzling vectors since 2004...

Building a new graphics engine in Rust - Part 2

22 February 2022

In my previous post I gave a high level overview of a new graphics engine project I was undertaking. I have been working quite consistently since then in the evenings and at weekends fleshing out a graphics API frontend called hotline::gfx:: and the first graphics backend hotline::gfx::d3d12 implemented with the assistance of windows-rs.

Read More

Building a new graphics engine in Rust

24 January 2022

It has been a while since I last posted an article. For the past 6 months I haven’t managed to get much coding done in my spare time. Partly due to work consuming most of my effort but also due to the relaxing of lockdown restrictions and making sure to take advantage of the opportunity to see my friends and family in real life. I had remaining holiday days to take from work, giving me 2 weeks off over the Christmas period and I was determined to get stuck into something new. Eventually I settled on building a new graphics engine in Rust. I already have a C++ engine, so this article is about why I am switching to Rust and why you should even build your own tech at all.

Read More

Not so modern c++

27 March 2021

There have been a lot of changes and additions to the c++ standard since I started using c++ in the early 2000’s, the language itself has started to look quite different. Yet I am still using a very stripped down subset of c++ actually more c-style and only reaching for c++ and modern c++ with careful consideration. Why is this? Because I have never really coveted new language features, I have always been more focused on the ‘details’ like the maths behind graphics effects or physics mechanics and not so much about the ‘glue’ of how it all fits together. I worked on and shipped games pre c++11 and saw effective techniques that worked well and stuck with them, these techniques provide good performance even in debug builds.

Read More

Hot reloading c++ for rapid development with the help of fungos/cr

06 February 2021

It has been almost a year of living with covid-19 lockdown restrictions and during this period I have been productively coding at home and having a lot of fun with hot reloadable c++ to aid rapid development. When the first lockdown measures began the first task I undertook was getting this system working and integrated into my game engine, it had been on my to-do list for a while, but with nowhere to go and not much else to do I created a workflow which has been enjoyable to use for the past year and has managed to produce some decent output. I’ll go through some details of how it works in this blog and show some of the things I’ve created so far.

Read More

Data oriented design is not about SoA and ECS

04 October 2020

There has been a lot of discussion coming to my attention recently regarding data oriented design (DOD) or data oriented architecture (DOA). It is something very close to my heart because I love optimisation; I have to do it for all the products I work on as a software engineer and so I am always thinking about the data first. Being data oriented is thinking about the data you have and the transformations you need to make, to get the output you desire on the hardware you are targeting.

Read More

A quick solution for OpenGLES lack of wireframe fill mode

24 September 2020

If you have ever worked with OpenGL you might be familiar with glPolygonMode. It allows you to specify GL_LINE, GL_POINT or GL_FILL, where fill is typically what we use to rasterise solid triangles, using lines allows us to achieve a wireframe effect. If you have ever then switched to OpenGLES (mobile or web platforms) you may have encountered GL_LINE being undefined and there is no way to get a wireframe fill mode.

Read More