OpenGL

Project Treewars: Going in Circles

It’s been quite a while since I actually worked on TreeWars. Various things have distracted me, including some other programming projects. But I actually made some progress way back in July, before I shelved the project temporarily. So, let’s talk about circles.OpenGL gives us a few different ways to draw things, which I’ve talked about before. When we were using the fixed-pipeline functions (glBegin(), glEnd(), etc), I could draw a circle the same way I drew it in SDL: draw a bunch of same-sized rectangles, shifting the coordinates around a central point so that they overlap.
Read more

Project TreeWars: How Anna got her Title Screen back

In my last post, I re-implemented all of my rendering code to take advantage of Shaders. After doing this, nothing rendered. Despite the fact that I was following a tutorial, more or less. I have been modifying it to fit my project, which has a lot of code around the rendering code already and is in C++ instead of C, and also modifying it to do something that will actually be useful for me down the line.
Read more

Project TreeWars: When is an OpenGL not an OpenGL?

So, I was playing around with the ‘sparks’ feature on Google+. Since I’ve been working with OpenGL lately, I made a spark for it. On that spark, I came across this thread, which gave me this advice:A general rule of thumb is that if a tutorial contains calls to glBegin, glEnd and/or any of the glTexEnv functions then it’s old and you should avoid it.Now, I wouldn’t generally trust a single person on the Internet with nothing to recommend them, but I’m seeing this advice repeated in several places now that I know to look.
Read more

Project TreeWars: the road to OpenGL

Over on Shamus Young’s blog, he recently said this when talking about a programming project of his:One of the things I like about this project is that it is uncluttered by goofy, awkwardly-designed libraries.Shamus is working on a procedurally-generated 3D world using OpenGL. Now, I know what he means. He is trying to avoid relying on things like graphics and physics engines, or 3D model importers, or any of a number of other tools that often have asinine and byzantine APIs.
Read more