Giter Club home page Giter Club logo

opengl_examples's Introduction

OpenGL examples

This is a list of examples done a few years ago after taking a computer graphic course to better understand opengl and apply some of the techniques read in the litterature.

Content of the repo:

  • Triangle: hello world program, tests the display and the buffers
  • Rotating cube: Add movement in the scene and transormation matrices
  • Mouse control: Ability to move an object with the mouse similarly to an arcball camera
  • Texture plane: Tests textures, both from an image and generated
  • Sphere light: Different lightings on a sphere: Flat Goureaud and Phong with interacitvity to select the lighting type
  • Terrain camera: A terrain generated with a Perlin noise in which we can navigate with either a free moving camera or a FPS-style one
  • Bumpmapping: Simulates bumps on a flat surface using random Perlin noise and pixel shader
  • Framebuffer: Displays the scene in a framebuffer, allowing post processing effects: gaussian blur, edge detection, etc.
  • LOD Terrain: Implementation of a perlin noise terrain with simple CPU LOD implementation (using quad tree), which is dynamically updated with camera position
  • Shadow mapping: Implementation of a dynamic shadow mapping using a depth buffer from the point of view of the light, smoothing techniques are applied on the shadow to make it less pixelated
  • Ambient occlusion: Deferred SSAO algorithm done in the shaders which give depth in a scene, a few different algorithms are implemented
  • Grass: Display 100k individual grass elements using instanced drawing and geometry shaders and make them move in the wind with a perlin noise
  • Water: Reflects objects on a water surface with waves distorting the reflexion
  • Sky: Displays a moving sun on a sky-sphere
  • Particles: A simple particles system using instanced drawing
  • Tree: Procedural generation of realistic trees using L-System
  • Atmospheric scattering: implemented in a similar way as in the GPU Gems 2 book
  • Volumetric clouds: using combination of 3d and 2d noises and particles
  • Texture filtering: use opengl to smooth textures
  • Tessellation shader: implement the level of detail directly in a shader
  • Volumetric light: post-processing volumetric light using ray casting as in the GPU Gems 3 book

How to build

Run the ./build script, it will build each example and the executables will be found in each example folder in the build subfolder. For example ./lod_terrain/build/lod_terrain

Alternatively, if you want to do it manually, create a build folder in the example you want to build, then from the build folder, cmake .. to populate it and make to build the example

All of these examples have been tested on the following hardware:

  • Intel HD graphics 620
  • Nvidia GeForce 940MX
  • Nvidia GeForce RTX 3050 Ti Mobile

There were compiled on a Linux Mint 20, the needed libraries are the following:

  • glfw 3.3.2
  • glew 2.1.0
  • devIl 1.7.8
  • glm 0.9.9.7

opengl_examples's People

Contributors

damdoy avatar juicy-llamas avatar arash28134 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.