A generalist’s journey to learn OpenGL.

  • OpenGL Color Interpolation

    GL_LINES Interpolates Using the GL_LINES mode, OpenGL will draw for us a line for every two vertices we specify. Behind the scenes, OpenGL is using interpolation to draw the line. That is, given 2 points, OpenGL will determine the set of pixels that the line would cross through and then change their color based on the color…

  • OpenGL Resolution

    This is a simple OpenGL app that displays the screen resolution (m x n grid of pixels) and the screen dimension in millimeters. The implementation is very simple. We use glutGet (GLUT_SCREEN_WIDTH) to get the screen width in pixels and glutGet (GLUT_SCREEN_HEIGHT) to get the screen height. To get the width and height in millimeters, we use glutGet (GLUT_SCREEN_WIDTH_MM)…

  • Download GL\GLUT\GLAUX\GLUI .lib, .h and .dll

    Edit: With Visual Studio 2015 Community edition, you won’t really need those files. Check out OpenGL in Visual Studio 2015 to see how easy it is to work with OpenGL without having to deal with managing all these files (thanks to Nuget). I also have the files below more organized on GitHub. Looking for the lib,…

  • OpenGL Image Generator

    The idea behind this post is very simple: generate m x n grid of pixels, with each pixel having a random color. Every time the user clicks the mouse or presses the ‘g’ key, a new random color is generated for each pixel. Since we are using the R, G and B components to represent…

  • OpenGL Frame Rate

    Calculating the frames per second in our Graphics application makes sense when we are displaying animation, which is simply a collection of images displayed rapidly and in sequence.When we watch a video\movie, the usual number of frames displayed in a second is 24. Our eyes can’t see all the 24 frames one by one in…