OpenGL Math

So when learning OpenGL i decided that i would write my own Math classes instead of using a math library such as glm. I always enjoy trying to use as few library as possible and having to write it myself as a fun challenged. A lot of people ask me why i would bother, just use an existing library, for me, It’s just fun! Continue reading “OpenGL Math”

Bitwise Operators

In this blog i will talk about some bitwise operators and their uses in programming. Operators such as: << , >> , | , & , ^ , ~ will be discussed.

The bitwise left shift operator <<

The bitwise shift operators works by shifting a number by a number of bits. For example if you shift the int value of 5 by the number of bits 2 in binary form, so 0100 now becomes 10100. We essential shifted the binary number 0100 by two bits. An interesting application for this is

Continue reading “Bitwise Operators”

Posted in C++

The Seperating Axis Theorem.

The separating axis theorem is one of the most useful things to know when programming collision detection. The separating axis shows that if you project the extents of the convex object in the direction of the axis and they do not overlap, then they do not intersect. If they do overlap and the objects are convex then the objects intersect.

Continue reading “The Seperating Axis Theorem.”

Starting college and my passion for programming.

Today I started college at IT Carlow to study Games Development. I’m very excited for my future and working towards achieve my dream of working in the games industry.  College isn’t for everybody, I myself strongly believe self education is the only true education there is, but a lot can be gained by going to college. Continue reading “Starting college and my passion for programming.”

Virtual Functions & Virtual Tables.

We all know what virtual functions are and how to use them but it’s also important to know how they are implemented under the hood. Lets first take a look a non-virtual functions. They are easy because a particular function call always maps to a particular part of the code. The compiler can calculate the address of that function at compile and link time. At runtime all it does is make a call to a fixed address.

Continue reading “Virtual Functions & Virtual Tables.”

Posted in C++