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 […]

GitHub

How to download repository from GitHub 1. Open provided GitHub repository link, for example (like in chapter 3) https://github.com/bkantemir/_wg_403 2. Click green button "Code". 3. I usually use "Download ZIP". 4. When downloaded, go to your Downloads folder and unpack downloaded zip file to your hard drive (usually C:). 5. Since in my case all […]

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

Memory leaks detection

Suddenly noticed that while running, memory consumption is slowly but steadily creeping up: which can only mean one thing: Well, then we need to find (detect) and fix it (or them). Some sort of memory leak detection tool would help. Visual Studio offers it's own set of "CRT debug heap functions". However, I was unable […]