Migrate timekeeping-related member variables to protected scope.
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m43s

This commit is contained in:
2024-09-30 23:35:06 -04:00
parent c5f94b7c49
commit c202ca5c84
2 changed files with 21 additions and 23 deletions

View File

@@ -127,7 +127,6 @@ namespace ReWindow
/// General To Do List
/// TODO: Implement accurate timekeeping on refresh. Have mechanism to expose to user (hook into their game engine's timestepping)
/// TODO: Clean up public API to express the cross-platform, multi-graphics-mode ethos of this project.
///
@@ -182,8 +181,6 @@ namespace ReWindow
/// Returns a Vector2 representing mouse coordinates relative to the top-left corner of the window.
Vector2 GetMouseCoordinates() const;
/// Sets which rendering API is to be used with this window.
void setRenderer(RenderingAPI api);
@@ -280,6 +277,26 @@ namespace ReWindow
static void glSwapBuffers();
Vector2 getLastKnownResize() const;
void setLastKnownWindowSize(const Vector2& size);
protected:
float delta_time;
float refresh_rate;
int refresh_count;
bool cursor_visible = true;
Vector2 lastKnownWindowSize {0, 0};
bool flags[5];
std::vector<RWindowEvent> eventLog;
KeyboardState currentKeyboard; // Current Frame's Keyboard State
KeyboardState previousKeyboard; // Previous Frame's Keyboard State
bool fullscreenmode = false;
std::string title;
int width;
int height;
RenderingAPI renderer;
bool open = false;
bool resizable;
Vector2 mouse_coords = {0, 0};
Vector2 last_mouse_coords = {0, 0};
private:
@@ -310,25 +327,8 @@ namespace ReWindow
void processMouseMove(Vector2 last_pos, Vector2 new_pos);
private:
bool cursor_visible = true;
Vector2 lastKnownWindowSize {0, 0};
bool flags[5];
std::vector<RWindowEvent> eventLog;
KeyboardState currentKeyboard; // Current Frame's Keyboard State
KeyboardState previousKeyboard; // Previous Frame's Keyboard State
bool fullscreenmode = false;
std::string title;
int width;
int height;
RenderingAPI renderer;
bool open = false;
bool resizable;
Vector2 mouse_coords = {0, 0};
Vector2 last_mouse_coords = {0, 0};
float delta_time;
float refresh_rate;
int refresh_count;
};
}

View File

@@ -10,8 +10,6 @@
#include <GL/gl.h>
Vector2 mouse_pos;
// TODO: Move to J3ML::LinearAlgebra::Vector2