Experiment in graphics programming, C++, OpenGL, simulation techniques.
{#} | Time | Hash | Subject | Author | # | (+) | (-) | GPG? |
---|---|---|---|---|---|---|---|---|
6 | 31 Aug 2023 21:18 | 3195a10 | Update program flow | Josh Stockin | 1 | 25 | 0 | G |
1 | #include <cstdint> |
2 | |
3 | |
4 | #include "SDL2/SDL.h" |
5 | #include "GL/gl3w.h" |
6 | |
7 | |
8 | #include "Renderer.hpp" |
9 | #include "IWindow.hpp" |
10 | |
11 | |
12 | Renderer::Renderer(IWindow& r_window): |
13 | m_rWindow(r_window) |
14 | { |
15 | |
16 | }; |
17 | |
18 | bool Renderer::Update(uint64_t time_since_last_update_us) |
19 | { |
20 | m_rWindow.MakeContextCurrent(); |
21 | glClearColor(0.5f, 0.5f, 0.5f, 0.5f); |
22 | glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); |
23 | m_rWindow.Update(1); |
24 | return false; |
25 | } |
26 |