Skip to content

sprintr/opengl-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenGL and GLUT examples

This is a repository of all the code work that I did in my Computer Graphics labs at BUITEMS, Quetta.

How to use

  1. Install GLUT
  2. Create a new empty project in Microsoft Visual Studio.
	File -> New -> Project -> Visual C++, General -> Empty Project
  1. Add a new source file.
  2. Paste the code from one of the source files and run

Warning

The color fill examples cause a stack overflow, if you use it to fill a large object. Create a small object to fill.

Files

Square, Diagnal Square

  1. OpenGL-SquareInsideSqaure.cpp

Square 2. OpenGL-Square.cpp

Quadraric Formula Curve 3. OpenGL-Quadratic-Equation.cpp

Parabola Curve 4. OpenGL-Parabola-Curve.cpp

Draw a line with mouse drag 5. OpenGL-MouseClick.cpp

Example of menu, Circle, ellipse, line, point examples 6. OpenGL-Menu.cpp

Uses Flood Fill to fill a square 7. OpenGL-FloodFill-Square.cpp

Uses Flood Fill to fill a circle 8. OpenGL-FloodFill-Circle.cpp

A static clock-like object, include circle and line example 9. OpenGL-Clock.cpp

Uses boundary fill algo to fill a square 10. OpenGL-BoundaryFill-Square.cpp

Uses boundary fill algo to fill a circle 11. OpenGL-BoundaryFill-Circle.cpp

Complex Polygon 12. OpenGL-Complex-Polygon.cpp

Concave Polygon 13. OpenGL-Concave-Polygon.cpp

Convex Polygon 14. OpenGL-Convex-Polygon.cpp

Keyboard: use W, A, S, D to control position of a square 15. OpenGL-Keyboard.cpp

Draw a square upon mouse square 16. OpenGL-MouseDrag-Square.cpp

Explaination

  1. OpenGL-Explaination.md

Licence

The MIT License (MIT) Copyright © 2013 Amin Ullah Khan

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

OpenGL and GLUT examples

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages