mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
skybox: added moon and stars
This commit is contained in:
parent
b42a517cc6
commit
a4a5aef422
22 changed files with 258 additions and 52 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue