Skip to content

YZircon/MeshViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MeshViewer

A C++/OpenGL Graphics Toy, it might be useful when you learning Computer Graphics

Features (Working now)

Model

.obj/.mtl

Rendering

  • Blinn-Phong

Build & Run

This project is configured for Windows 10 64 bit & CLion 2022.3.1. If you are using a highly differentiated platform (Such as Linux or MacOS) or toolchain (Such as MSVC), the CMakeLists.txt and other 3rd packages may not work properly.

  • mkdir build && cd build ("&&" operator need Windows PowerShell 7 or higher version, If your PowerShell not support it, you may split this command into mkdir build and cd build)
  • cmake -G Ninja ..
  • ninja

Then, you'll find a executable file named MeshViewer.exe and a Dynamic Linking Library named glfw3.dll in the build folder. This is what you have build.

Currently, the shader & resource path is hard-coded in main.cpp , to make the program run correctly, the architecture of your directory should be like the below:

  • MeshViewer (any folder name you like will also be ok)
    • MeshViewer.exe
    • glfw3.dll
    • models (hard-coded now, so do not modify the name of directory and files )
    • src
      • shader (hard-coded now, so do not modify the name of directory and files )

Resources

3rd Party Libraries

  • Glad, Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs, https://glad.dav1d.de/
  • GLFW, an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan development on the desktop, https://www.glfw.org/
  • Eigen, a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms, https://gitlab.com/libeigen/eigen
  • OBJ-Loader, A C++ OBJ Model Loader that will parse .obj & .mtl Files into Indices, Vertices, Materials, and Mesh Structures, https://github.com/Bly7/OBJ-Loader, I modified some of them to support more descriptions in the obj file, the new code follows the license of this project.
  • stb, single-file public domain(or MIT License) libraries for C/C++, https://github.com/nothings/stb
  • Dear Imgui, Bloat-free Graphical User interface for C++ with minimal dependencies, https://github.com/ocornut/imgui

Models

About

A C++/OpenGL Computer Graphics Toy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published