Skip to content
/ eel Public

Simple 3D engine/sample program written using modern OpenGL (3+).

License

Notifications You must be signed in to change notification settings

mjbogusz/eel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EEL

Modern OpenGL (3+) sample program.

It displays a (very simplified) 3D eel (with 2 materials, normal mapping and togglable animation) in a skybox with 2 sources of light. There is also a test-sphere present 'behind' the camera (assuming default camera orientation). In the scene there are 2 sources of light (white - 'sun' and red - red sphere).

Main features

  • Working in OpenGL 3.3 Core profile
  • Most computations happen in shaders (almost zero CPU usage)
  • Improved Blinn-Phong attenuated shading model
  • Normal mapping
  • N light sources per scene, M materials per object (with alpha-blending - it's possible to apply a non-specular material on a very glossy one)
  • Modular/OOP design

Controls

  • WSAD for camera movement
  • Mouse for camera rotation (when enabled - see below)
  • F to toggle fullscreen
  • M to toggle mouse capture (disabled on startup)
  • T to toggle animations (rotations)

Requirements

  • OpenGL 3.3 capable graphic card, e.g. Intel HD Graphics 3000 (Intel Core 2nd gen CPUs), NVidia GeForce 8 series, ATI/AMD Radeon HD 2000 series and newer
  • C++11 compatible compiler (tested on modern GCC and VC++)
  • For Windows: installed VC++ 2015 redistributable package (due to included precompiled libpng file)
  • For non-Windows OS: installed OpenGL, GLUT, GLEW, zlib and libpng libraries (Windows headers and pre-compiled .lib files are included)

Compilation & running the program

  • Preparation: put your textures in eel/Resources/* and/or adjust paths in main.cpp (some textures, generated by me in GIMP, are present but some aren't there due to copyright reasons)
  • Windows: use eel.snl Visual Studio solution file or eel/eel.vcxproj project file (open with VS or import to your IDE of choice). Build and run.
  • Linux/*nix: use provided Makefile (make or make run should be enough).

Known issues:

  • Execution caveat: hardcoded relative paths to textures (in main.cpp). Run from 'eel' directory (with Resources directory in it - see Makefile) or modify the paths (or change the way they're passed). Using VC++ run target or make run will handle it for you though.
  • Mouse capture may not be working in MacOS (GLUT limitations; should work with up-to-date GLUT though)
  • The OOP design of the program is quite poor
  • The animations are being calculated on CPU (possible performance bottleneck)

Special thanks

Copyright notice

This software is licensed under MIT License (see LICENSE file).

About

Simple 3D engine/sample program written using modern OpenGL (3+).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages