OpenGL Polygon

While running on Linux I discovered a bug in my makefiles which caused nothing to compile if it did not have the “-lm” flag. This is because the sin and cos functions from the standard math library. Windows was implicitly adding it behind the scenes so I never learned to include it on the command line.


But more importantly, I got a working OpenGL regular polygon program working. I spent hours going over the documentation of freeglut and opengl to figure out how to get it working. When I have had some rest I want to do a video covering that. Then eventually I’ll have to figure out how I get an accessible pixel array from a freeglut created window the same as I normally do with SDL. Once I have access to the pixels that means saving them with my BBM library code to files. This means a combination of my existing math which has proven to be great at creating animations but also the speed of OpenGL rendering polygon. There is still so much to learn but once I can draw a polygon I can always draw more. Squares are also polygons and so I can draw an whole checkerboard using opengl polygons once I take the time to code it.


My OpenGL regular polygon source code is available here for anyone who wants to see.
https://sourceforge.net/projects/binary-bit-map/files/source/opengl/gl_regpoly/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s