Chapter 4. Platform independence

Visual Studio, C++, OpenGL ES, cross-platform 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 matches... Except C++ and GL syntax, which […]

Chapter 3. Hello Windows

Visual Studio, Windows, C++, OpenGL ES, GLFW, GLAD 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 an OpenGL loading libraries (GLAD). Well, […]

Chapter 2. Hello Android

Android Studio, Native Activity, Game Activity, C++, OpenGL ES 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 Jetpack library designed […]

Chapter 1. Preparing workplace

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++). […]

Chapter 38. Hierarchical models

Now we are ready for more complex models, consisting of several elements with individual behavior. For example - car, where body will be a parent (root) element, and wheels - child elements. For both, body and wheel, we'll need separate model descriptors and separate classes, which will handle their behaviors. 1. In Windows File Explorer […]