OpenGL 101
- OpenGL 101
Installation
pre-requisites
- OSX or Linux
- OpenGL/Glut
- g++
$ git clone [email protected]:MrcRjs/OpenGl101.git
$ cd OpenGl101
Each practice has it's own makefile, by default it will compile all artifacts
$ cd practica1
$ make
$ ./basic.o
Contents
Practica 1
ejemplo1.cpp
Examples on how to use GL_POINTS, GL_LINES, GL_POLYGON, GL_TRIANGLE, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_QUADS, GL_QUAD_STRIP, GL_LINE_STRIP GL_LINE_LOOP
.
Practica 2
actividades.cpp actividades-alt.cpp
Translation, rotation and scaling examples using own functions
and OpenGL built-in glTranslate()
glRotate()
and glScale()
Practica 3
primitiveRobot.cpp
Graphing a drawing using only triangles, quadrilaterals and coordinates.
primitiveRobotFunctions.cpp
The character is separated into different parts to be drawn with separate functions.
Practica 4
menus.cpp menu.cpp menu_niveles.cpp
Creation and management of options menus to modify the graphic content using glutCreateMenu()
glutAttachMenu()
glutAddSubMenu()
and glutAddMenuEntry()
.
curvas.cpp
Graphing of different curves, with a menu of options to modify the color, shape and background color.
key_motion.cpp
Use keyboard events to modify graphics with glutKeyboardFunc()
.
Practica 5
iluminacion3D.cpp iluminacion3Dpt2.cpp
Use of diffuse, specular and spot lights using glLightfv()
proyeccion3D.cpp
Camera positioning using gluLookAt()
Practica 6
teteras.cpp
Applying different textures like redPlastic, blackPlastic, esmeralda, pewter, chrome using glMaterialfv()
texturas1/texturas.cpp, texturas2/texturas.cpp texturas3/multtexturas.cpp
Loading textures from BMP files with glTexParameter()
and using an external library SOIL SOIL_load_image()
and gluBuild2DMipmaps()
Practica 8
curvas_bezier
Creation of Bézier curves defining points on a plain.
simpsons_bezier
Simpson's characters created using Bézier curves.
superficie_bezier
Creation of Bèzier surfaces using glEvalMesh()
and glMapGrid()
.
Final
final.cpp
Loading 3D scenarios using an external library OBJ-Loader