pmba / opengl-room

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenGL Room

This is a simple C++ and OpenGL project to render a 3d room space with diverse objects.

A simple room scene preview

Table of Contents

Prerequisites

The only prerequisites are:

  • OpenGL, GLUT and GLEW
  • C++ Compiler

Usage

There are two ways of running the program

Compiling and Executing (By Hand)

To compile the program just run the following command

g++ main.cpp -o main -lglut -lGLU -lGL -lGLEW

And once compiled, simply run the following command to execute it

./main

P.S: The above commands are for the g++ compiler

Using Makefile

If you have all the prerequisites already installed, you can simply run the make command to compile and run. But you will need to have the Make installed as well

make

Controls

Movement Controls

Command Key Action Description
W, A, S, D Move Forwards, Left, Backwards and Right Capslock cannot be active
Q, E Move Up and Down Capslock cannot be active
Mouse Look Around Hold left click and move the mouse to look around

Objects Controls

Command Key Action Description
P Open and Close the door Capslock cannot be active
J Open and Close the window Capslock cannot be active
L Turn on and off the table lamp Capslock cannot be active
V Turn on and off the fan Capslock cannot be active

Contributing

As this was a project made for study purposes only, pull requests are not welcome. But feel free to fork the repository and modify it as you wish.

License

MIT

About

License:MIT License


Languages

Language:C++ 85.7%Language:C 12.5%Language:Objective-C 1.7%Language:CMake 0.1%Language:Makefile 0.0%