Skip to content

MrcRjs/OpenGl101

Repository files navigation

OpenGL 101

Installation

pre-requisites

$ git clone git@github.com: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 1

Practica 2

actividades.cpp actividades-alt.cpp

Translation, rotation and scaling examples using own functions and OpenGL built-in glTranslate() glRotate() and glScale()

Practica 2

Practica 3

primitiveRobot.cpp

Graphing a drawing using only triangles, quadrilaterals and coordinates.

Practica 3 GIR

primitiveRobotFunctions.cpp

The character is separated into different parts to be drawn with separate functions.

Practica 3

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().

Practica 4 menu

curvas.cpp

Graphing of different curves, with a menu of options to modify the color, shape and background color.

Practica 4 curvas

key_motion.cpp

Use keyboard events to modify graphics with glutKeyboardFunc().

Practica 4 key motion

Practica 5

iluminacion3D.cpp iluminacion3Dpt2.cpp

Use of diffuse, specular and spot lights using glLightfv()

Practica 5 Practica 5 Practica 5 Practica 5 Practica 5 Practica 5

proyeccion3D.cpp

Camera positioning using gluLookAt()

Practica 5

Practica 6

teteras.cpp

Applying different textures like redPlastic, blackPlastic, esmeralda, pewter, chrome using glMaterialfv()

Practica 6 Practica 6 Practica 6

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 6 Practica 6 Practica 6

Practica 8

curvas_bezier

Creation of Bézier curves defining points on a plain.

Practica 8 Practica 8 Practica 8 Practica 8

simpsons_bezier

Simpson's characters created using Bézier curves.

Practica 8 Practica 8

superficie_bezier

Creation of Bèzier surfaces using glEvalMesh() and glMapGrid().

Practica 8 Practica 8

Final

final.cpp

Loading 3D scenarios using an external library OBJ-Loader

Final

About

Digital graphing examples using OpenGL freeglut, from basic shapes, to lighting, textures and 3D objects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published