The goal of this project is to interpret a wavefront .obj file and display the object using modern OpenGL.
This project was written on macOS. Testing / compatibility for other systems has not yet been done.
- Features section in README.md
Clone the repository onto your system and run make
.
If everything compiled well, you should have the executable scop
in your directory.
Execute scop
with the relative paths to a .obj file and a .bmp file as arguments:
./scop resources/textured_teapot.obj resources/bluetexture.bmp
W: Move camera up (positive Y) A: Move camera left (negative X) S: Move camera down (negative Y) D: Move camera right (positive X) I: Move camera forward (negative Z) O: Move camera backward (positive Z)
Left arrow: Turn object counterclockwise around its own Y-Axis Right arrow: Turn object clockwise around its own Y-Axis Up arrow: Turn object clockwise around its own X-Axis Down arrow: Turn object counterclockwise around its own X-Axis R: Turn object counterclockwise around its own Z-Axis T: Turn object clockwise around its own Z-Axis K: Scale object bigger L: Scale object smaller Tab: Switch object texture between random colours for each polygon and the provided texture
1: Use simple shader (no lighting effects) 2: Use lighting shader (Phong Lighting Model effects)
![skull](https://private-user-images.githubusercontent.com/81682578/239069680-a5a7dcbb-16ef-4d74-9ef5-5599d6057bba.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4MDQ2MzQsIm5iZiI6MTcyNDgwNDMzNCwicGF0aCI6Ii84MTY4MjU3OC8yMzkwNjk2ODAtYTVhN2RjYmItMTZlZi00ZDc0LTllZjUtNTU5OWQ2MDU3YmJhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI4VDAwMTg1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNhMGZiYWE5MTczNzg0MDIxY2QxYmE3NGJhOWQ2MDdiOGE5YWJkMDhiZDdiZDJjY2FmY2E4MGM4MDlmNzNmOTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Fjoc4S7uTO_SU2yyxTdYoWP2lurfx51IVIj8yLRIjuQ)