Cross-platform graphics engine, GameDev, 3D, C++, Android, Windows, OpenGL ES, Visual Studio, Android Studio
Well, it's a big topic. I'd even say HUGE. Here we'll need to decide how to build and render our scene/models, where we'll get our 3D models from, how we'll load, unpack and control them, which and how many shaders we will need and how to provide data for them. To make long story short, instead of guiding you through all this long and curvy path, here I want to introduce my Graphics Engine from the first version of this site (see "First Reincarnation" table of content in the right side pane, chapters 10 to 42).
WARNING: Surely, it could be done in many different ways. This particular implementation reflects solely my personal vision of this topic. It is NOT a recognized Computer Graphics Community approach.
In this implementation the Graphics Engine consists of 2 major parts: "Renderer" (xEngine) and "Modeler", which is responsible for loading and unpacking 3D models and converting them to data arrays (VAO, VBO, IBO), digestible for consequent use by the Renderer. Modeler is aimed to generate models programmatically, so it doesn't use pre-built 3D models at this point. Instead it uses text instructions telling what to generate and how. Model descriptions/instructions are located in project/dt folder.
This is not a complete Engine yet. We'll still have to implement:
- 3D formats support (such as OBJ or GLTF/GLB)
- and so on
We will do this in following chapters. In the meantime, download the current implementation from GitHub.
This is how it works and looks (runs on both Windows and Android):
Here I wanted to draw Great Gatsby's car (it's 1929 Duesenberg J Sport Phaeton).
Next demo includes 4 cars and my very first model here - Marlboro pack:You can download both demos (Windows version) here.