https://github.com/yeduk3/openglstudy
OpenGL을 공부하는 레포지토리입니다.
https://github.com/yeduk3/openglstudy
cpp opengl
Last synced: 2 months ago
JSON representation
OpenGL을 공부하는 레포지토리입니다.
- Host: GitHub
- URL: https://github.com/yeduk3/openglstudy
- Owner: yeduk3
- Created: 2025-01-22T05:52:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-06T07:58:43.000Z (over 1 year ago)
- Last Synced: 2025-03-27T20:47:35.642Z (over 1 year ago)
- Topics: cpp, opengl
- Language: GLSL
- Homepage:
- Size: 478 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# In dependencies,
GLEW, GLFW, glm include folders are hidden.
GLEW, GLFW's library files are hidden.
Read .gitignore file
If you add all the hidden things into proper folder, you will get the intended result.
# How to execute
There are some own test files.
`#include "renderers/basic_triangle.hpp" // btri`
`#include "renderers/colored_triangle.hpp" // ctri`
`#include "renderers/colored_triangle_3d.hpp" // ctri3d`
`#include "renderers/utah_teapot.hpp" // utah`
`#include "renderers/parallel_projection_test.hpp" // pptest`
Each header file has different namespace. You can test any of them by changing some parts of `main.cpp` file.
1. Include header file what you wanna test.
2. Write only one `using namespace `. You can check the distinct name of headers in each `~.hpp` files.
3. Run!
## Common features
- Some file can rotate camera by `dragging` and modify fovy by `scrolling`
## utah_teapot.hpp
- `Up/Down arrow`: Increase/Decrease light intensity.
- `Left/Right arrow`: Increase/Decrease shininess.
- `Space`: Rotate the light position by y-axis.
- `B`: Switch shading between **Phong lighting** and **Blinn-Phong lighting**.
- `G`: Toggle `Gamma Correction`.
## parallel_projection_test.hpp
- `Left Click`: Switch projection method between **Perspective** and **Parallel**.