Onwards to the rendering model
The first abstractions for the rendering model have found their way into helios, and the first example application has already rendered its first primitives onto the screen (aka the Hello World!
of 3D Computer Graphics).
de Vries' book on OpenGL is proving (once again) to be very useful, as it provides some common, coarse-grained abstractions that serve as a great starting point for further refinement. Think of separating concerns like Meshes, Materials, and Shaders.
I'm striving for a more loosely coupled (and hopefully maintainable) relationship between these entities. The goal is for Shaders to be reusable across multiple Material instances, which in turn can be applied to multiple Mesh instances, with each mesh being uniquely owned by a renderable node... it's (unintentionally) think big at this point: Here's hoping I don't end up shooting myself in the foot!
Here's a look at the foundational data structure the rendering is built on:
module;
export module helios.rendering.core.Vertex;
import helios.math.types;
export namespace helios::rendering::core {
/**
* Represents a standard vertex with position, normal,
* and texture coordinates.
*
* @see [Vri20, pp. 160]
*/
struct Vertex {
math::vec3 position;
math::vec3 normal;
math::vec2 texCoords;
};
}
I have also added a first (short) draft for the coding style guide. I expect a few changes here and there in the upcoming weeks, since I'm still not quite acquainted with the C++ ecosystem. However, move semantics are really starting to grow on me.