WIP Fullscreen Stuff (UI not scaling properly yet)

This commit is contained in:
2014-06-01 03:05:42 +02:00
parent a6906886f5
commit 72420d4248
6 changed files with 34 additions and 12 deletions
+9 -5
View File
@@ -5,6 +5,9 @@ Renderer::Renderer(std::shared_ptr<::ResourceManager> resourceManager)
: ResourceManager(resourceManager)
{
m_VSync = false;
m_Fullscreen = false;
m_Width = 1280;
m_Height = 720;
#ifdef DEBUG
m_DrawNormals = false;
m_DrawWireframe = false;
@@ -38,11 +41,12 @@ void Renderer::Initialize()
}
// Create a window
m_Width = 1280;
m_Height = 720;
// Antialiasing
//glfwWindowHint(GLFW_SAMPLES, 16);
m_Window = glfwCreateWindow(m_Width, m_Height, "OpenGL", nullptr, nullptr);
GLFWmonitor* monitor = nullptr;
if (m_Fullscreen)
{
monitor = glfwGetPrimaryMonitor();
}
m_Window = glfwCreateWindow(m_Width, m_Height, "OpenGL", monitor, nullptr);
if (!m_Window)
{
LOG_ERROR("GLFW: Failed to create window");