mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
refactor + auto max atlas resolution
This commit is contained in:
parent
befc9cf09c
commit
eb70e1c0df
7 changed files with 46 additions and 12 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "Events.h"
|
||||
#include "../debug/Logger.h"
|
||||
#include "../graphics/core/ImageData.h"
|
||||
#include "../graphics/core/Texture.h"
|
||||
|
||||
#include <GL/glew.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
|
|
@ -145,6 +146,13 @@ int Window::initialize(DisplaySettings& settings){
|
|||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GLint maxTextureSize[1]{static_cast<GLint>(Texture::MAX_RESOLUTION)};
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, maxTextureSize);
|
||||
if (maxTextureSize[0] > 0) {
|
||||
Texture::MAX_RESOLUTION = maxTextureSize[0];
|
||||
logger.info() << "max texture size is " << Texture::MAX_RESOLUTION;
|
||||
}
|
||||
|
||||
glfwSetKeyCallback(window, key_callback);
|
||||
glfwSetMouseButtonCallback(window, mouse_button_callback);
|
||||
glfwSetCursorPosCallback(window, cursor_position_callback);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue