
Static inline int sphere_intersects_ray(Sphere sphere, Ray ray) else if (event.getAction() = MotionEvent.OpenGL ES API Versions at a Glance OpenGL ES 3.2 - Additional OpenGL functionality Static inline void ray_intersection_point(vec3 result, Ray ray, Plane plane)

Static inline float distance_between(vec3 point, Ray ray) Let’s wrap up geometry.h: static inline int sphere_intersects_ray(Sphere sphere, Ray ray) These are a few typedefs that build upon linmath.h to add a few basic types that we’ll use in our code. Let’s start off with the following code: #include "linmath.h" We’ll first need to add some helper functions to a new core file called geometry.h. The first thing we’ll do is update the core to add touch interaction to the game. Updating our game code for touch interaction Adding a 3d Perspective and Object Rendering to Our Air Hockey Project in Native C Code.Loading a PNG into Memory and Displaying It as a Texture with OpenGL ES 2: Adding Support for EmscriptenĪdding a 3d perspective, mallets, and a puck.Loading a PNG into Memory and Displaying It as a Texture with OpenGL ES 2: Adding Support for iOS.Loading a PNG into Memory and Displaying It as a Texture with OpenGL ES 2, Using (Almost) the Same Code on iOS, Android, and Emscripten.Calling OpenGL from C on the Web by Using Emscripten, Sharing Common Code with Android and iOSĪdding support for PNG loading into a texture.Calling OpenGL from C on iOS, Sharing Common Code with Android.Calling OpenGL from C on Android by using the NDK.Here are the previous posts in this series: Setting up a simple build system This lesson continues the air hockey project series, building upon the code from GitHub for ‘article-3-matrices-and-objects’.



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.
