This project showcases various basic graphics techniques using GLUT. Users can choose from four distinct programs, each demonstrating a unique graphics technique or transformation.
- Anti Aliasing Technique: Draws houses with smoother edges using the anti-aliasing technique.
- Translation and Rotation: Demonstrates the translation and rotation transformations on houses.
- Color Gradient: Renders a rectangle with vertices colored in red, green, blue, and yellow, creating a gradient effect.
- Complex Transformations: Displays houses transformed using translation, scaling, and rotation.
Clone this repository to your local machine with:
git clone https://github.com/vmsaif/basic-graphics-with-glutEnsure you have Visual Studio installed. If not, download it from Visual Studio Official Website.
This project requires the OpenGL library or glut.h. The easiest way to set it up in Visual Studio is as follows:
- Navigate to the directory where you cloned the project.
- Open the
basic-graphics-in-opengl.slnfile in Visual Studio. - Click on
Projectin the menu bar. - Select
Manage NuGet Packages. (If you don't see it, close the VS window, then resume from step 2.) - Click on the "Browse" tab.
- Search for "freeglut".
- Select "nupengl.core" (which includes glut.h) and click
Install.(If already installed, then uninstall then install again).
- Open the project in Visual Studio.
- Press
F5or choose theRun Without Debuggingoption. - Follow the on-screen prompts to select and run a graphics program.
- Using Anti Aliasing Technique: Draws two houses with rotation and one house using the anti-aliasing technique for smoother edges.
- Translating and Rotating: Renders a house five times, showcasing translation and rotation transformations.
- Color Gradient: Displays a rectangle with vertices set to red, green, blue, and yellow, creating a gradient effect.
- Houses with Transformations: Illustrates eight houses with triangle roofs and floors, transformed using translation, scaling, and rotation. The houses are crafted using basic shapes.