In this post in the air hockey series, we’re going to wrap up our air hockey project and add touch event handling and basic collision detection with support for Android, iOS, and emscripten. Prerequisites This lesson continues the air hockey project series, building upon the code from GitHub for ‘article-3-matrices-and-objects’. Here are the previous posts in this series: … Continue reading Finishing Up Our Native Air Hockey Project With Touch Events and Basic Collision Detection»
For this first post in the Developing a Simple Game of Air Hockey Using C++ and OpenGL ES 2 for Android, iOS, and the Web series, we’ll create a simple Android program that initializes OpenGL, then renders simple frames from native code. Prerequisites The Android SDK & NDK installed, along with a suitable IDE. An … Continue reading Calling OpenGL from C on Android, Using the NDK»
In our last lesson, we learned how to use vertex buffer objects on Android. We learned about the difference between client-side memory and GPU-dedicated memory, and the difference between storing texture, position and normal data in separate buffers, or altogether in one buffer. We also learned how to work around Froyo’s broken OpenGL ES 2.0 … Continue reading Android Lesson Eight: An Introduction to Index Buffer Objects (IBOs)»
In this lesson, we’ll introduce vertex buffer objects (VBOs), how to define them, and how to use them. Here is what we are going to cover: How to define and render from vertex buffer objects. The difference between using a single buffer with all the data packed in, or multiple buffers. Problems and pitfalls, and what … Continue reading Android Lesson Seven: An Introduction to Vertex Buffer Objects (VBOs)»
In this lesson, we will introduce the different types of basic texture filtering modes and how to use them, including nearest-neighbour filtering, bilinear filtering, and trilinear filtering using mipmaps. You’ll learn how to make your textures appear more smooth, as well as the drawbacks that come from smoothing. There are also different ways of rotating … Continue reading Android Lesson Six: An Introduction to Texture Filtering»
In this lesson we’ll take a look at the basics of blending in OpenGL. We’ll look at how to turn blending on and off, how to set different blending modes, and how different blending modes mimic real-life effects. In a later lesson, we’ll also look at how to use the alpha channel, how to use … Continue reading Android Lesson Five: An Introduction to Blending»
This is the fourth tutorial in our Android series. In this lesson, we’re going to add to what we learned in lesson three and learn how to add texturing.We’ll look at how to read an image from the application resources, load this image into OpenGL ES, and display it on the screen. Follow along with me and … Continue reading Android Lesson Four: Introducing Basic Texturing»
Welcome to the the third tutorial for Android! In this lesson, we’re going to take everything we learned in lesson two and learn how to apply the same lighting technique on a per-pixel basis. We will be able to see the difference, even when using standard diffuse lighting with simple cubes. Assumptions and prerequisites Each … Continue reading Android Lesson Three: Moving to Per-Fragment Lighting»