Overv / Open.GL

The source code and content of Open.GL.
http://open.gl/
1.07k stars 259 forks source link

Added exercise solutions, fixed bugs and improved formatting throughout the code base #49

Closed NightPixel closed 8 years ago

NightPixel commented 8 years ago

I added exercise solutions to chapters 6, 7, and 8. I also rewrote the Sobel operator fragment shader in chapter 6, which was broken.

Furthermore, I made numerous adjustments to all code files. The event loops were buggy (the SFML window was closed prematurely, leading to access violation errors), which I fixed. Chapters 7 and 8 didn't have glDelete() cleanup code, which I added. Chapter 4, exercise 2 used the CLOCKS_PER_SEC macro from ; I replaced that with std::high_resolution_clock from , which is already used everywhere else. As a result, that code is now framerate-independent. I also updated the formatting and code style throughout the code files (and the code fragments in the articles as well) to be more consistent (e.g. applying consistent indentation rules), and cleaned up the code (e.g. removing unused #includes and labels). This also fixes a text overflow glitch in the GLFW section of chapter 1.

Moreover, since "framebuffer" was used over 150 times and "frame buffer" like 6 times, I changed all occurrences of the latter term to "framebuffer" for the sake of consistency. Finally, I updated two images from chapter 4; the diagrams now have prettier curves compared to the old, hand-drawn ones. The Sobel operator image in chapter 6 was also updated to reflect the result of the new fragment shader.

I tested all the code files again and everything still compiles and runs fine. The only potential issue I can foresee is that the new Sobel operator fragment shader code might be too long to fit on the page, leading to text overflow glitches; if that is the case, some newlines could be added inside that code fragment to break up the lines. I'm not sure if this is an issue, since I can only see the markdown, not the final site page.

An acknowledgement to me (Toby Rufinus) would be appreciated :-)

Overv commented 8 years ago

You did a fantastic job! I've added your name and the names of the other major contributors to a new credits section in the introduction.