Monday 20 September 2021

Home Engine - Lines and Camera Interaction

 Yes, yes, it has been a while; both here and on the YouTube channel, I've just been very busy okay?... Okay.  Friends?... Friends.

So what have I been up to in code?... Well today I added line rendering to my home engine, this is still using the underlying "Triangle" raw data, so I have to always have a cleanly divisible by 3 (for the sides of a triangle) number of indices in the data, but otherwise it just seamlessly integrated.

Its using "LineList" as the underlying primitive type, which maps to the D3D11 type under.


I also noticed that these lines from 0, 0, 0 to 1, 0, 0 and 0, 1, 0 and 0, 0, 1 respectively are "backwards", that is my unbeknownst to me at some point my camera has started to spawn around in front of there my scene objects are, so I'm looking back along the Z axis not "up" along it... Am I making sense?

I also improved the camera some by linking the rotation of the camera to the mouse, which makes it super intuitive.

The failed part of the work this last month was an effort to update both the Vulkan and the OpenGL renderer implementation.  This was an utter failure, the simple reason being that I've gone too long with my limited knowledge with DirectX.  I'm sure the "port" to DirectX12 will be easier, but yeah, I've already gotten the other API's so far from my implementation (abstract base classes) that it's quite alien to return to them.

I'll circle back on that, maybe break down the API's with failed/broken builds until I can slowly etch away at the challenge.

No comments:

Post a Comment