Skip to content

It is a C++ graphics application that loads and renders 3D models with flat shading using SDL and OpenGL

License

Notifications You must be signed in to change notification settings

bl33h/3dModelsFlatShading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3dModelsFlatShading

The code represents a program for loading and rendering a 3D model using SDL (Simple DirectMedia Layer) and OpenGL.


pic

FilesFeaturesHow To Use

Files

  • configure.sh: A shell script to set up the project dependencies and environment.
  • build.sh: A shell script to build the project using CMake.
  • run.sh: A shell script to execute the compiled graphics application.
  • clean.sh: A shell script to clean up build artifacts and generated files.
  • src: A directory containing the source code files for the graphics application.
    • barycentric.cpp: Implementation of functions related to barycentric coordinates calculation.
    • border.cpp: Implementation of functions for drawing lines.
    • border.h: Header file declaring functions for drawing lines.
    • colors.h: Header file defining color structures and operations.
    • fragment.h: Header file defining fragment and shader-related structures.
    • framebuffer.cpp: Implementation of functions for handling the frame buffer.
    • framebuffer.h: Header file declaring functions and data structures for managing the frame buffer.
    • print.h: Header file containing functions for printing various data types.
    • shaders.h: Header file defining fragment and vertex shader functions.
    • trianglefill.cpp: Implementation of functions for loading 3D models.
    • trianglefill.h: Header file declaring functions and data structures for loading 3D models.
    • triangles.h: Header file declaring functions and structures related to triangle rendering.

Features

The main features of the graphics application include:

  • Loading and rendering 3D models.
  • Flat shading of the 3D models.
  • Use of barycentric coordinates for triangle rendering.

How To Use

To clone and run this application, you'll need WSL (Windows Subsystem for Linux) and the following tools installed on it: Git, C++ compiler, CMake, Make, glm, tbb, and SDL2. From your command line:

# Clone this repository
$ git clone https://github.com/bl33h/3dModelsFlatShading

# Open the project
$ cd 3dModelsFlatShading

# Give execution permissions
$ chmod +x configure.sh
$ chmod +x build.sh
$ chmod +x run.sh

# Run the app
$ ./run.sh

About

It is a C++ graphics application that loads and renders 3D models with flat shading using SDL and OpenGL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages