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++). […]
Introduction. What is it all about
GameDev, 3D, cross-platform, C++, Android, Windows, OpenGL ES 3.2. This blog turned out to practically step-by-step instruction (tutorial) how to write cross-platform 3D app (game) from scratch. To write own game is my old dream. Now I know how to do it right. Have a few ideas in mind what it could be, haven't decided […]
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 […]
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 […]
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 […]