OpenGL ES 3D engine on Symbian and Windows
This post collects the development notes of my first C++ 3D engine. The engine ran on my notebook under Windows and on my Nokia N8 under Symbian S^3 Belle. It used OpenGL ES 2.0, and the Qt framework provided the application shell. The engine became later the base of a 3d rewrite for the Switcher task manager.
First output
The graphical part reached a first release in March 2012. Physics with the Bullet engine, audio and touch input were planned for a later date. A level editor and a shader editor were planned as well.

Draw call and buffer management
All meshes are sorted by material. This prevents multiple texture and shader switches per frame. Identical meshes are sorted next to each other, so the vertex arrays do not get send to the GPU again.
The debug window below shows CPU and GPU load, framerate, timestep, both averages, material switches per frame and vertex array switches per frame. The engine ran on one CPU core only.

Vertex buffer objects replaced the vertex arrays and the gain was large. The numbers below are triangles per second.
- about 34 560 720 triangles per second without VBOs
- about 115 200 720 triangles per second with VBOs
The test machine used an Intel Core i7 at 2.2 GHz and an nVidia GT 540. The Nokia N8 also gained a lot of speed.
The phone test reached about 1.5 million triangles per second. That equals 48 012 triangles in 33.3 frames.
Shader class rewrite
The shader class got a full rewrite, and the renderer adapted to the new class. After that change it became possible to write own shaders and own rendering techniques. The cost was the reimplementation of the shader class with a few own functions.

Runtime object and texture control
The early release could not delete models, meshes, materials or texture maps at runtime. That became possible later, and these were the rules I had to respect:
- load a model once and create instances of it, or load a full copy into RAM
- update single texture maps of a material at runtime
- delete a model when it is no longer needed
- never update or delete the real model when instances exist, because that changes every instance
Engine tools and the model viewer
I started a tool window in April 2012. The first version held system stats and window tools only.

In September 2012 I built a small model viewer to preview models inside the engine and to play around with shaders and settings. The model is Betty, the first ship of Gallaxy on Fire 2. A strong specular map makes the scratches shine and the hull starts to look like metal.

Procedural planets
In april 2010 I got inspired by the amazing tech demo that later became Infinity: Battlescape
I played around with pocedural generation of spherical shapes. The first step of was the vertex generation of an icosahedron sphere. Subdivision level 2 gives about 0.9k vertices. Subdivision level 5 gives over 61k vertices.

The experiment never went any where far, but later I tried to pick up the idea again in unity, but also quickly dropped it.
First release
The manual and the class diagram went along with the graphical part. The release also used the Imagination Technologie emulator for Windows, which was the way to develop for the phone from a desktop machine. The code was opensourced and ultimately ended up later in the following repository: https://github.com/AJ92/Engine

The 3D part of a future project Switcher used an early version of this engine and went out for testing in May 2012 as an unsigned app. The https://github.com/AJ92/Switcher repository still contains parts of this version...
Planned, never shipped features
The plan for the next engine version listed these items:
- model viewer with ASE, OBJ, FBX and a binary model format loader
- binary model format exporter
- shader tweaking and shader coding at runtime
- model variable editing at runtime, for example light parameters
- Bullet physics 2.8x
- an Android port where everything gets written once again
The engine never reached that state. Symbian died in 2013, and the desktop rewrite got a new name. See the Quark renderer for the follow-up project.