A generalist’s journey to learn OpenGL.

  • OpenGL FreeGlut in Visual Studio 2015

    Starting an OpenGL project in VS 2015 is really easy, thanks to the NupenGL.Core nuget package. Here are really quick steps to start your first OpenGL project using the FreeGlut library to provide a Window toolkit. Open Visual Studio 2015 Community Edition and create a new Visual Studio C++ Windows Console Application. Keep it simple. Choose…

  • OpenGL Camera

    What is a Graphics Camera? The concept of a camera in a Graphics application is simple. Just imagine that what you see is the view of the camera. So adjusting the camera lens or moving\rotating it should affect your view. The gluLookAt function In the base OpenGL library, there is no concept of a camera.…

  • GLUT Menu World

    This post demonstrates how to create a GLUT menu and add to it sub-menus and menu items. In the above sample app, clicking on a menu item in the popup menu will log that menu item’s ID to the console window. Below is the function setupMenus() that creates the main menu and adds to it…

  • Dynamic Three Dimensional Arrays in C\C++\C#\Java

    If you come from a Java or C# perspective and want to create a multi-dimensional array in C or C++, you’ll soon figure out that multi-dimensional array allocation in C\C++ is not as simple, plus you’ll have to worry about deallocation since there is no garbage collector to do the work for you. Below I’ll…

  • C Pointer Tricks

    I’ve been exploring\reading more about C pointers (mostly from this source) and I’ve found the following interesting tricks. Trick 1 – Pointer Arithmetics Question What is the result of running the following code? Solution ptr = arr This will make the pointer ptr point to the first element in the array arr. *ptr++ = -1…