mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Add loading screen with random WOWEE splash images
- Add loading screen system with stb_image for JPEG loading - Two loading screen images (orc and dwarf) randomly selected - Display loading screen while terrain data loads - Cache WMO inverse matrices to reduce per-frame computation - Stub WMO liquid rendering (needs coordinate system fix) - Update spawn point to Stormwind Trade District
This commit is contained in:
parent
665a73e75f
commit
01bf3b4c08
14 changed files with 8395 additions and 165 deletions
50
include/rendering/loading_screen.hpp
Normal file
50
include/rendering/loading_screen.hpp
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
#pragma once
|
||||
|
||||
#include <GL/glew.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace wowee {
|
||||
namespace rendering {
|
||||
|
||||
class LoadingScreen {
|
||||
public:
|
||||
LoadingScreen();
|
||||
~LoadingScreen();
|
||||
|
||||
bool initialize();
|
||||
void shutdown();
|
||||
|
||||
// Select a random loading screen image
|
||||
void selectRandomImage();
|
||||
|
||||
// Render the loading screen (call in a loop while loading)
|
||||
void render();
|
||||
|
||||
// Update loading progress (0.0 to 1.0)
|
||||
void setProgress(float progress) { loadProgress = progress; }
|
||||
|
||||
// Set loading status text
|
||||
void setStatus(const std::string& status) { statusText = status; }
|
||||
|
||||
private:
|
||||
bool loadImage(const std::string& path);
|
||||
void createQuad();
|
||||
|
||||
GLuint textureId = 0;
|
||||
GLuint vao = 0;
|
||||
GLuint vbo = 0;
|
||||
GLuint shaderId = 0;
|
||||
|
||||
std::vector<std::string> imagePaths;
|
||||
int currentImageIndex = 0;
|
||||
|
||||
float loadProgress = 0.0f;
|
||||
std::string statusText = "Loading...";
|
||||
|
||||
int imageWidth = 0;
|
||||
int imageHeight = 0;
|
||||
};
|
||||
|
||||
} // namespace rendering
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue