Featured Posts

8. Bump Mapping in GLSL8. Bump Mapping in GLSL Introduction Bump mapping is essential in todays computer games, and computer graphics in general. Would you like to know the best thing about it? It is extremely simple to implement. Bump mapping works...

Read more

Swiftless GLSL Shader DeveloperSwiftless GLSL Shader Developer Swiftless GLSL Shader Developer   Version 0.1a Currently Swiftless GLSL Shader Developer is in it's first public release, and is currently in alpha status, meaning it is not complete and may contain...

Read more

Wordpress Optimization Wordpress Website Optimizations Introduction Wordpress itself is a fairly wonderful tool. Since switching to it, I find it is a lot quicker to make changes to my website and it is also quicker to get...

Read more

36. OpenGL Framebuffers36. OpenGL Framebuffers Introduction Frame buffers are one of those mythical things that we have all heard of, but many beginner OpenGL developers avoid because there is not much information about them, and they can be confusing...

Read more

1. Terrain Class1. Terrain Class Terrain is one of those things that so far, hasn't been perfectly recreated in computer graphics. But it is almost there! Looking over a beautiful landscape can be one of the most amazing feelings in the...

Read more

  • Prev
  • Next

OpenGL

Important information regarding OpenGL and these tutorials:
- These tutorials are meant for OpenGL versions 1.x and 2.x. Alot of the information in these tutorials is outdated and either deprecated or removed in OpenGL 3.x and 4.x, so I am going to write some new tutorials on OpenGL 4.0 instead of wasting everyones time on rewriting these older tutorials.
Cheers,
Swiftless

  • 1. OpenGL Window (Version 2.0) - March 23, 2010

    OpenGL Window Tutorial Preview
    If you wish to learn OpenGL, then this is the very first tutorial for you. Learn how to create a GLUT window with an OpenGL context, and how to initially setup OpenGL.

  • 2. OpenGL Window Reshaping (Version 2.0) - March 25, 2010

    OpenGL Window Reshaping Tutorial PreviewRe-shaping a window with an OpenGL context can cause undesired scaling if not done correctly. If you wish to learn how to fix this, then this tutorial is for you. Learn how to setup your projection matrix with a viewing angle and both near and far planes.

  • 3. OpenGL Keyboard Interaction (Version 2.0) - March 25, 2010

    OpenGL Keyboard Interaction Tutorial PreviewKeyboard interaction can be handled by the user using system API calls, but why do that when you are already using GLUT which can handle this for you? This tutorial will focus on getting and using the keyboard with the help of GLUT.

  • 4. OpenGL Primitives - Square (Version 2.0) - March 25, 2010

    OpenGL Square Tutorial PreviewOne of the very first things you will want to do with OpenGL is learn how to draw shapes. OpenGL provides some basic shapes, which can then used to make complex 3D objects.

  • 5. OpenGL Color (Version 2.0) - March 25, 2010

    OpenGL Color Tutorial PreviewColour is one of the fundamental building blocks of a scene. Colours can be used to portray mood, realsim, fictions, intensity, or anything else. It's up to the artist, and in this case, you are the artist.

  • 6. OpenGL Cube (Version 2.0) - March 25, 2010

    OpenGL Cube Tutorial PreviewFrom basic 2D shapes, 3D shapes are built. And whilst complex, there are some which are provided to us by GLUT, one of those being your standard cube, made up of 12 triangles and 8 vertices, why hand code it yourself?

  • 7. OpenGL Rotation and Translation (Version 2.0) - March 25, 2010

    OpenGL Rotation and Translation Tutorial PreviewPlacing objects in a 3D scene is nice, but often enough, you want to be able to move and interact with these shapes. Here you will learn how to rotate them with a single command.

  • 8. OpenGL Double Buffering - March 25, 2010

    OpenGL Double Buffering Tutorial PreviewWhile single buffering still displays our final image, it can cause artifacts. Double buffering lets us draw everything in a second buffer, and when finished, lets us transfer it to the screen for a smoother application.

  • 9. OpenGL Blending - March 25, 2010

    OpenGL Blending Tutorial PreviewColours can be mixed and matched in OpenGL, just like in real life. Here you will learn how to blend shapes using OpenGL, allowing you to overlay shapes on top of each other to get the most realism you can.

  • 10. OpenGL Scaling - March 25, 2010

    OpenGL Scaling Tutorial PreviewDrawing shapes is fine, moving them about is fine. But do you always want a shape to be the same size? Are all tree's the same height? Of course not. Here I will show you how to scale your 3D shapes.

  • 11. OpenGL Lighting - March 25, 2010

    OpenGL Light Tutorial PreviewFlatly colouring shapes is perfect, if we want an unrealistic look to our scene. But for realism, we really want to add some sort of lighting system. You can learn here how to use OpenGL's lighting system for a more realistic scene.

  • 12. OpenGL Materials and Lighting - March 25, 2010

    OpenGL Lighting Materials Tutorial PreviewNow you have your scene looking a little nicer with some lighting, but all objects are a gray colour. Here we will learn how to assign materials to shapes to change how they look under different lighting conditions.

  • 13. OpenGL Lighting Types - March 25, 2010

    OpenGL Lighting Types Tutorial PreviewOpenGL provides us with not one, but three different types of lights we can make, directional lights, point lights and spot lights. I will try to teach you about how each is different, and how to use them.

  • 14. OpenGL Fog - March 25, 2010

    OpenGL Fog Tutorial PreviewEver notice how on a clear day, your visibility seems to go on for miles, but when the weather changes, a nice misty fog may come over, and your vision can be reduced to virtually nothing? Well OpenGL has it's own fog system we can take advantage of if we wish to re-create this natural effect.

  • 15. OpenGL Fog Types - March 25, 2010

    OpenGL Fog Type Tutorial PreviewJust like there are different types of lighting in OpenGL, we also have different types of fog for different effects. Learn how to use them in this tutorial.

  • 16. OpenGL Texturing - March 25, 2010

    OpenGL Texturing Tutorial PreviewThe next step in the quest for realism after lighting, comes in the form of texturing. Texturing is the art of drawing an image on top of a 3D object and is the core behind all 3D applications. Could you imaging Half Life 2 coming out, and the characters looked like store mannequins?

  • 17. OpenGL Texture Coordinate Generation - March 25, 2010

    OpenGL Texture Coordinate Generation Tutorial PreviewWhen assigning a texture to an object, you need to declare the texture coordinates, little values between 0 and 1 that tell us which part of the image maps to which part of the 3D model. OpenGL has some texture coordinate methods for generic texturing.

  • 18. OpenGL Popping and Pushing Matrices - March 25, 2010

    OpenGL Pop and Push Matrices Tutorial PreviewWhen drawing objects in OpenGL, it can be annoying that you do a translation, and then before drawing the next shape, you have to do a reverse translation to fix your positions. Well OpenGL being a state machine, has the ability to pop and push the current model view matrix, meaning you push on a duplicate of the current matrix before you do your translation, and then revert to the old matrix by pulling the new one off.

  • 19. OpenGL Fullscreen Mode - March 25, 2010

    OpenGL Fullscreen Tutorial PreviewMost games we know, run in fullscreen mode, and lucky for us, GLUT provides this ability also. So let me show you how to make use of it.

  • 20. OpenGL MipMap Generation - March 25, 2010

    OpenGL Mipmap Tutorial PreviewMip maps are an essential texture extension, which creates scaled down versions of a texture and uses them when an object gets further away, or closer to the near plane. This scaled down version of the texture, makes for nicer, smoother looking textures.

  • 21. OpenGL Display Lists - March 25, 2010

    OpenGL Display List Tutorial PreviewDisplay lists are a cached version of a set of OpenGL calls, which can be called again and again, at quicker framerates than writing the code over and over again. There is much controversy over the use of these against Vertex Buffer Objects in relation to speed, so I will show you both, starting with display lists in this tutorial.

  • 22. OpenGL Camera - March 25, 2010

    OpenGL Camera Tutorial PreviewIf you look at making any game where the scene is larger than can be displayed in the window at once, then you are going to need some type of camera system. This is the first of several tutorials on building a first person camera system.

  • 23. OpenGL Camera Part 2 - March 25, 2010

    OpenGL Camera 2 Tutorial PreviewHere I will be extending upon the previous OpenGL Camera tutorial, and adding a strafe feature (moving side to side). A game without strafing, is going to be terrible, especially when it comes to multiplayer when strafing against enemy fire is essential.

  • 24. OpenGL Camera Part 3 - March 25, 2010

    OpenGL Camera 3Tutorial PreviewThe first person camera is done, lets take a look at the third person camera, which is essential any type of Role Playing Game. The best part is, this tutorial uses most of the same code as the previous camera tutorial. Just some minor changes to entirely change the feel of your game.

  • 25. OpenGL Vertex Coloring - March 25, 2010

    OpenGL Vertex Coloring Tutorial PreviewAlong with assigning colours to objects, did you know you can also set colours to individual vertices? Well yes, yes you can.

  • 26. OpenGL Vertex Alphas - March 25, 2010

    OpenGL Vertex Alpha Tutorial PreviewAlpha values, just like colours, can be assigned on a per-vertex basis. This allows for varying levels of transparency across objects.

  • 27. OpenGL Basic Shadows - March 25, 2010

    OpenGL Basic Shadow Tutorial PreviewWith lighting, comes shadowing. This tutorial takes a basic stencil buffer, and uses it as a stencil to draw a basic shadow on to it.

  • 28. OpenGL Basic Reflection - March 25, 2010

    OpenGL Basic Reflection Tutorial PreviewJust like our shadowing tutorial, this one uses the stencil buffer, but we are going to keep our color buffer enabled to allow us to keep our colors for a basic reflection.

  • 29. OpenGL Bounding Sphere Collision - March 25, 2010

    OpenGL Bounding Sphere Tutorial PreviewAt present, none of our OpenGL shapes can interact with each other, that is because OpenGL is purely graphics, it doesn't handle physics, so using the Euclidean distance algorithm, we can implement some basic bounding sphere collision ourselves.

  • 30. OpenGL Circle Drawing - March 25, 2010

    OpenGL Circle Drawing Tutorial PreviewCircles are one of the few shapes that are not default in OpenGL, but the good news is, they are easily created using lines. In this tutorial, I will show you how to draw a nice, round, circle.

  • 31. OpenGL Sphere Creation - March 25, 2010

    OpenGL Sphere Tutorial PreviewWhile GLUT provides a sphere for us to draw, that sphere does not contain texture coordinates. In this tutorial, I will show you how to create your own sphere, which has texture coordinates included. Now you can make that solar system demo you have always wanted!

  • 32. OpenGL Particle Engine - March 25, 2010

    OpenGL Particle Engine Tutorial PreviewLets face it, particles are ALOT of fun. Whether you want to create a weather system, some awesome fire, or just throw a million objects around randomly, they are both stimulating in a game, and fun.

  • 33. OpenGL Animating Textures - March 25, 2010

    OpenGL Animating Textures Tutorial PreviewTextures by themselves are perfectly fine, you don't have to do anything with them. But have you ever wanted to load a movie into a 3D scene? Maybe you want to read a movie file, and display it on a quad moving around your scene. Well you can, but you have to do it frame, by frame.

  • 34. Orthogonal Projections - March 25, 2010

    OpenGL Orthogonal Projections Tutorial PreviewWhile OpenGL is built for 3D rendering, it does also support 2D. This is where you want orthogonal projections, which are perfect for a Heads Up Display, or a menu system.

  • 35. OpenGL Tiling Engine - March 25, 2010

    OpenGL Tiling Engine Tutorial PreviewIf you want to create a game like Sim City, or an RPG, then you are going to need some sort of tiling engine. This breaks up the ground into a bunch of known images and places them on runtim. This saves us having extremely large image files for an entire map and also makes it customizable in-game.

  • 6. Terrain Vertex Buffer Objects - March 25, 2010

    Terrain Vertex Buffer Object Tutorial PreviewVertex Buffer Objects are used to store vertices, their indices and other information on the graphics card, for OpenGL to access directly. They are extremely fast and effecient, and are meant to supersede Display Lists. So lets use them for our terrain!

  • 1. OpenGL Drivers - March 25, 2010

    The OpenGL drivers can be tricky for some people to find, and whilst I recommend using GLEW and FreeGLUT, feel free to download these files, although they may be out of date.

  • 3. OpenGL Tips - March 25, 2010

    Here is a collection of tips for using OpenGL that I have started compiling, expect it to grow :)

  • 36. OpenGL Framebuffers - April 22, 2010

    OpenGL Framebuffer Tutorial Preview
    If you want to use any type of off screen rendering process, then frame buffers are probably the go for you. They allow you to render an entire scene, directly to a texture.

VN:D [1.9.3_1094]
Please rate so I know where to improve the site. 1 means needs a lot of improvement, 10 means perfect. If you leave a low rating, please state why. I don't want people just coming to bash the site.
Rating: 9.6/10 (74 votes cast)
VN:F [1.9.3_1094]
Rating: +33 (from 37 votes)
OpenGL, 9.6 out of 10 based on 74 ratings
Improve the web with Nofollow Reciprocity.