Skip to content

Jtaim/ModernOpenGL

Repository files navigation

Introduction

A project to learn basic OpenGL.

Getting Started

Getting project setup:

  1. Get an IDE

    • Get Microsoft Visual Studio Community download
  2. Software dependencies

    • I'm using vcpkg. This a package manager for C\C++ libraries from Microsoft.
    • for this project I'm using GLFW, GLAD, GLM and SOIL2.
    • Installed the files above (replace libfile with names above)
      > ./vcpkg install "libfile":x64-windows-static
    • All installed libraries are immediately ready to be #include'd and used in your project without additional configuration.
      > .\vcpkg\vcpkg integrate install
  3. References

    • Learn OpenGL
    • OpenGL
    • GLAD Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs
    • GLM OpenGL Mathematics (GLM) header only C++ mathematics library for graphics software.
    • SOIL2 Tiny C library used primarily for uploading textures into OpenGL.
    • docs.GL OpenGL reference

Project Properties:

NOTE: make sure All Configurations is selected

  1. Configuration Properties > General
    • set the output directory to ./../bin/ to provide common place for the executable
  2. Configuration Properties > Debugging
    • change the Working Directory from ProjectDir to OutDir
  3. Configuration Properties > Linker > Input
    • add the Additional Dependencies (glfw3.lib; glew.lib; soil2.lib opengl32.lib) keep the defaults already there.
    • may need to do release and debug configurations separately additional dependencies.
  4. could do this an not worry about all the linkage hassle
    • Properties > Use Vcpkg > yes
    • Properties > Use static libraries > yes
    • Properties > Use AutoLink > yes
    • Properties > Triplet > x64-windows-static
  5. Set an entry point if needed for the program:
    • Configuration Properties > Linker > System (ensure that the SubSystem is set to Console (/SUBSYSTEM:CONSOLE))

Okay, I think that is it, happy coding.

About

Learn modern OpenGl

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published