Skip to content

Hello Triangle demo program using legacy OpenGL 2.1 (GLSL 1.2)

License

Notifications You must be signed in to change notification settings

JamesMakela/HelloTriangleLegacy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HelloTriangleLegacy

A simple-as-possible example of an OpenGL Program using legacy OpenGL 2.1 (GLSL 1.2)

Okay, I decided it was time to finally learn some of the ins and outs of OpenGL software development, and of course there were quite a few instructional online resources willing to give a few hints here and there. There happened to be a few online tutorials showcasing an OpenGL version of a "hello world" program named hello_triangle.cpp, which would put a triangle in a window, rendered by OpenGL.

These tutorials are great, or they would have been if I was using a modern PC with a modern graphics card. You see, these tutorials were focused on OpenGL 3.3 or higher (as of about Jan, 2017).

As it was, I had an old laptop (circa ~2009) with an old video card (GeForce 7150M / nForce 630M). And I was running Linux, so the newest drivers I could get only supported OpenGL 2.1 (GLSL version 1.20)

So I went through a lot of pain and effort, and took a lot of time going through the legacy specifications that I could find online. And I was finally able to develop a version of the hello_triangle demo program that worked with the older APIs.

It's funny that I had to cobble this together in bits and pieces, that there were no legacy instructional tutorials that would have helped me through all this. Surely I can't be the only person out there with old hardware who wants to get into OpenGL.

So I hope that the next developer who finds him/herself in a similar situation will find this and have at least a slightly easier time than I did.

Building the project

This is a simple C++ project created in Eclipse CDT. It has the project configuration files, and should be importable into a new workspace. It shouldn't be too difficult for anyone familiar with Eclipse.

However, it is a very simple project that could be converted to a number of other development environments.

About

Hello Triangle demo program using legacy OpenGL 2.1 (GLSL 1.2)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages