Browse Source

WIP/TEMP

pull/202/head
Squareys 10 years ago committed by Jonathan Hale
parent
commit
5e094036dd
  1. 5
      src/Magnum/Platform/GlfwApplication.cpp
  2. 4
      src/Magnum/Vk/Context.cpp

5
src/Magnum/Platform/GlfwApplication.cpp

@ -128,6 +128,7 @@ bool GlfwApplication::tryCreateContext(const Configuration& configuration) {
} else { } else {
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
} }
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
/* Set context flags */ /* Set context flags */
_window = glfwCreateWindow(configuration.size().x(), configuration.size().y(), configuration.title().c_str(), monitor, nullptr); _window = glfwCreateWindow(configuration.size().x(), configuration.size().y(), configuration.title().c_str(), monitor, nullptr);
@ -147,11 +148,15 @@ bool GlfwApplication::tryCreateContext(const Configuration& configuration) {
glfwMakeContextCurrent(_window); glfwMakeContextCurrent(_window);
/* Return true if the initialization succeeds */ /* Return true if the initialization succeeds */
<<<<<<< HEAD
if(configuration.version() != Version::None) { if(configuration.version() != Version::None) {
return _context->tryCreate(); return _context->tryCreate();
} else { } else {
return true; return true;
} }
=======
return true; //_context->tryCreate();
>>>>>>> WIP/TEMP
} }
GlfwApplication::~GlfwApplication() { GlfwApplication::~GlfwApplication() {

4
src/Magnum/Vk/Context.cpp

@ -32,12 +32,14 @@
namespace Magnum { namespace Vk { namespace Magnum { namespace Vk {
unsigned int layerCount = 2;
const char *validationLayerNames[] = const char *validationLayerNames[] =
{ {
// This is a meta layer that enables all of the standard // This is a meta layer that enables all of the standard
// validation layers in the correct order : // validation layers in the correct order :
// threading, parameter_validation, device_limits, object_tracker, image, core_validation, swapchain, and unique_objects // threading, parameter_validation, device_limits, object_tracker, image, core_validation, swapchain, and unique_objects
"VK_LAYER_LUNARG_standard_validation" "VK_LAYER_LUNARG_standard_validation",
"VK_LAYER_LUNARG_api_dump"
}; };
Context* Context::_current = nullptr; Context* Context::_current = nullptr;

Loading…
Cancel
Save