enabledExts[enabledExtsCount++] = #ext; \
}
+static void glfw_error_callback(int error, const char *description) {
+ fprintf(stderr, "vkengine: GLFW error %d: %s\n", error, description);
+}
+
VkSampleCountFlagBits getMaxUsableSampleCount(VkSampleCountFlags counts)
{
if (counts & VK_SAMPLE_COUNT_64_BIT) { return VK_SAMPLE_COUNT_64_BIT; }
vk_engine_t* vkengine_create (VkPhysicalDeviceType preferedGPU, VkPresentModeKHR presentMode, uint32_t width, uint32_t height) {
vk_engine_t* e = (vk_engine_t*)calloc(1,sizeof(vk_engine_t));
- glfwInit();
+ glfwSetErrorCallback(glfw_error_callback);
+ assert (glfwInit()==GLFW_TRUE);
assert (glfwVulkanSupported()==GLFW_TRUE);
uint32_t enabledExtsCount = 0, phyCount = 0;
void vkengine_set_char_callback (VkEngine e, GLFWcharfun onChar){
glfwSetCharCallback(e->window, onChar);
}
-