mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
Add progress bar to loading screen and handle resize during loading
Loading screen now shows a gold progress bar with percentage and status text. All loading steps poll SDL events for window resize and quit.
This commit is contained in:
parent
01f339908c
commit
89d1e44454
3 changed files with 276 additions and 52 deletions
|
|
@ -18,7 +18,7 @@ public:
|
|||
// Select a random loading screen image
|
||||
void selectRandomImage();
|
||||
|
||||
// Render the loading screen (call in a loop while loading)
|
||||
// Render the loading screen with progress bar and status text
|
||||
void render();
|
||||
|
||||
// Update loading progress (0.0 to 1.0)
|
||||
|
|
@ -30,12 +30,18 @@ public:
|
|||
private:
|
||||
bool loadImage(const std::string& path);
|
||||
void createQuad();
|
||||
void createBarQuad();
|
||||
|
||||
GLuint textureId = 0;
|
||||
GLuint vao = 0;
|
||||
GLuint vbo = 0;
|
||||
GLuint shaderId = 0;
|
||||
|
||||
// Progress bar GL objects
|
||||
GLuint barVao = 0;
|
||||
GLuint barVbo = 0;
|
||||
GLuint barShaderId = 0;
|
||||
|
||||
std::vector<std::string> imagePaths;
|
||||
int currentImageIndex = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue