Tags: Visual Studio, File I/O, Resource Management, Win32 API, Build Events, C++, Data-Driven Design Now, having a cross-platform solution, we can start thinking about our Graphics Engine. However, the first question will be not about graphics, but how we gonna handle data files (like shaders, models, textures and so on)? For example, currently our triangle […]
Category: Cross-platform 3D
Chapter 5. Hello Cross-platform!!
Tags: Cross-Platform Success, Android NDK, CMake, OpenGL ES 3.2, C++ Core, Mobile & Desktop, Software Architecture Now we will try to run TheApp spinning triangle sample on Android. For this we’ll need: Didn’t find how to add classes/files outside of cpp folder in Android Studio, so let’s do it manually. 1. In Windows File Explorer […]
Chapter 4. Platform independence
Tags: Software Architecture, C++ Classes, Cross-Platform Design, Code Decoupling, Platform Abstraction, Reusable Core In the previous 2 chapters, we have successfully “married” Android and C++, Windows and OpenGL ES. Now, having 2 C++/GLES projects for 2 different platforms, let’s see what is common and what is not. The difference actually looks frightening, seems like nothing […]
Chapter 3. Hello Windows
Tags: Visual Studio, OpenGL ES 3.2 on Desktop, GLFW, GLAD, Win32, C++, Cross-Platform Foundation Using OpenGL ES on the PC is less straight forward than on Android. The reason is that GL ES is intended for mobile devices, NOT for desktops. Fortunately, solutions exist. OpenGL producers strongly advise to use a window toolkit (GLFW) and […]
Chapter 2. Hello Android
Tags: Android Studio, NDK, GameActivity, C++, OpenGL ES 3.2, EGL, Native Programming Default Android languages are Java and Kotlin. In order to use C++ we’ll need so called NativeActivity. Start Android Studio. Pick New Project. Scroll down, select Game Activity (C++) which is a direct descendant of NativeActivity and shares a similar architecture. It’s a […]
Chapter 1. Setting up the workspace
Visual Studio, Android Studio, project basic structure First step is to prepare a placeholder for our project. *VERY IMPORTANT part missing from most guides is how to organize your folders. So, first – root folder, where we’ll keep all our projects plus all reusable stuff, such as graphics engine, etc. I’ll call it “CPP” (for C++). […]
Introduction – What is it all about
Tags: GameDev, 3D Engine, Cross-Platform, C++, OpenGL ES 3.2, Low-Level Programming, Software Foundation This blog has evolved into a practical, step-by-step guide on writing a cross-platform 3D app (game) from scratch. Writing own game is my old dream. Now, I finally know how to do it right. Have a few ideas in mind what it […]
Chapter 42.2 Great Gatsby’s car demo
DOWNLOAD DEMO (Windows) With such handy modeling toolkit, just couldn’t resist the temptation to draw Great Gatsby’s car. Fans of Elegance Age, Art Deco and Steampunk will understand. Had to expand the functionality of ModelLoader and ModelBuilder a little, and here is the result: It’s 1929 Duesenberg J Sport Phaeton (just in case). Or in […]
Chapter 42. Models variability (with GitHub)
Ok, time for a new GitHub repo. The topic of this chapter is Models variability. Of course, 1 single car model isn’t enough for the Project. We’ll need more. At least – in different colors. Creating a set of practically identical models with just different colors looks kind of wasteful. Instead, we can randomly customize […]
Chapter 40. Shadows (with GitHub)
Another (maybe the most) critical component of a realistic image is SHADOWS. The common approach is “shadow mapping“. The algorithm consists of two passes. First, the scene is rendered from the point of view of the light source. Only the depth of each fragment/pixel is calculated. The scene is then rendered as usual, but with […]






