skybox: added moon and stars

This commit is contained in:
MihailRis
2024-01-26 02:49:42 +03:00
parent b42a517cc6
commit a4a5aef422
22 changed files with 258 additions and 52 deletions
+11
View File
@@ -167,6 +167,17 @@ int Window::initialize(DisplaySettings& settings){
return 0;
}
void Window::setBlendMode(blendmode mode) {
switch (mode) {
case blendmode::normal:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
break;
case blendmode::addition:
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
break;
}
}
void Window::clear() {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
+6
View File
@@ -14,6 +14,10 @@ class ImageData;
struct DisplaySettings;
struct GLFWmonitor;
enum class blendmode {
normal, addition
};
class Window {
static GLFWwindow* window;
static DisplaySettings* settings;
@@ -53,6 +57,8 @@ public:
static const char* getClipboardText();
static DisplaySettings* getSettings();
static void setBlendMode(blendmode mode);
static glm::vec2 size() {
return glm::vec2(width, height);
}