Partial Template Specialization is Pattern Matching

When I was first introduced to the concept of template meta programming (TMP) I thought it was black magic! Well, it is, and remains so, until you see things from the correct perspective. 

Coming from an imperative programming background I have the (bad?) habit of understanding functions as a sequence of operations, this is great, until it holds you back and doesn’t work anymore. Template meta programming in C++ is all about doing computations at compile time, before the program run. Continue Reading…

Implementing An Octree Raycasting Algorithm

In the previous article I talked about how to implement a basic octree data structure to use in different applications. In this article I will introduce my full implementation for an important octree ray casting technique.

Ray casting in general is used to describe any algorithm that includes finding the intersection between a ray (directed line) and any geometric entities. In our context we will use ray casting exclusively to describe octree traversal. In other words, finding the intersection between a ray and octree, results in finding all the sub-nodes in the octree that are intersected by the ray. Continue Reading…

Building A Multipurpose Octree Datastructre

Lately, I have been working hard on my 3D engine Storm3D. One of the features that I am spending a lot of time on, is developing a generic and efficient octree data structure, that will be used for multiple purposes that varies from collision detection to voxel based rendering. Here I will introduce the basic algorithm for building the octree and some of the obstacles that you might face.
Continue Reading…

A Generic Solution for Handling OpenGL 3.1 Uniform Variables

Starting from OpenGL 3.0,  a deprecation mechanism was introduced. Certain features were marked as deprecated, While still accessible in OpenGL 3.0 by requesting a full context, OpenGL 3.1 fully removed all the deprecated features. the most important deprecated feature was the fixed-pipeline Continue Reading…

Hello world!

Hello world! I am Mohammad Ghabboun, and this is my new blog CodingShuttle !

This blog is something I wanted to do for a long time and now here it comes CodingShuttle. Here we will talk about different programming techniques, algorithms, computer graphics and even design patterns. I hope you find this blog useful and entertaining.