This is a collection of OpenGL exercises and experiments. The goal is to learn and understand OpenGL by doing experiments and exercises. This project is templeted from my base templete opengl-base
- Understanding drawing algorithms (for lines, circles, bezier curves, etc) using Drawmode with GL_POINTS
- Understanding transformations
- Default Blank Window
- Lines using DDA & Bresenham Algorithm
- Circles using Midpoint & Bresenham Algorithm
- Circle Art: Illusive pattern using circles
- Ellipses using Midpoint Algorithm
- Ellipse Art: Toyota Logo using ellipses
- Rook 2D: Rook using trangles & lines, demonstrating 2D transformations
- House 3D: demonstrating 3D transformations
- Fill Art: Fill the shapes using Boundry Fill & Flood Fill Algorithm
- DDA Line Drawing Algorithm
- Bresenham Line Drawing Algorithm
- Midpoint Circle Drawing Algorithm
- Breseham Circle Drawing Algorithm
- Midpoint Ellipse Drawing Algorithm
- 2D Transformations (Translation, Rotation, Scaling, Shearing, Reflection)
- 3D Transformations (Translation, Rotation, Scaling, Reflection)
- Boundry Fill Algorithm
- Flood Fill Algorithm
- OB_CaptureFrame : To take screenshot of the current frame
- GetWidthHeight : To get the width and height of the window
- GetPixels : To get the pixels of the window
- RenderPixels : To render the pixels to the window
- GetPixelIndex : To get the index of the pixel in the pixel array
- getPixelColor : To get the color of the pixel in the pixel array
- setPixelColor : To set the color of the pixel in the pixel array
src/- Contains the source code for the various algorithmsrenderer/- Contains the source code for the experiments done using Draw mode (each file is a seperate renderer [expreriment])shaders/- Contains the shaders for the experiments done using Shader modeinclude/- Contains the header files base setup
brew install glfw3 glewcomment / uncomment out the #define OB_ENABLE_SHADER in include/ob.h to switch between Draw Mode and Shader Mode
update the RENDERER variable in Makefile to the file name of the renderer you want to run
update the shaders name in include/ob.h to the shaders you want to run
call OB_CaptureFrame(filepath, context), it will save the current frame to the filepath
makeor
Run task Build & Run in vscode (cmd + shift + b)