]> O.S.I.I.S - jp/vkhelpers.git/commitdiff
dont expose VMA include in vkh.h
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 23 Jul 2018 11:18:59 +0000 (13:18 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 23 Jul 2018 11:18:59 +0000 (13:18 +0200)
include/vkh.h
src/vkh_app.c
src/vkh_buffer.h
src/vkh_device.h
src/vkh_image.h

index 24b327a0d86c19e5c1493bc5cd3529ad30a9b450..0e20fdb49a1af3b53f3874267349b17ce6c7f35a 100644 (file)
@@ -27,7 +27,10 @@ extern "C" {
 #endif
 
 #include <vulkan/vulkan.h>
-#include "vk_mem_alloc.h"
+
+typedef enum VmaMemoryUsage VmaMemoryUsage;
+
+//#include "vk_mem_alloc.h"
 
 #include <stdlib.h>
 #include <stdio.h>
index 95a1083a345daf97c1a3af5b924c716d15169bd2..d8b4f512c8ecb1c6cd9628d709640dfe90a2902f 100644 (file)
@@ -20,6 +20,7 @@
  * THE SOFTWARE.
  */
 #include "vkh_app.h"
+#include "vk_mem_alloc.h"
 
 #define ENGINE_NAME     "vkhelpers"
 #define ENGINE_VERSION  1
@@ -33,13 +34,13 @@ VkhApp vkh_app_create (const char* app_name, int ext_count, const char* extentio
                                 .pEngineName = ENGINE_NAME,
                                 .engineVersion = ENGINE_VERSION,
                                 .apiVersion = VK_API_VERSION_1_0};
-#if DEBUG
+/*#if DEBUG
     const uint32_t enabledLayersCount = 1;
     const char* enabledLayers[] = {"VK_LAYER_LUNARG_standard_validation"};
-#else
+#else*/
     const uint32_t enabledLayersCount = 0;
     const char* enabledLayers[] = {NULL};
-#endif
+//#endif
 
     VkInstanceCreateInfo inst_info = { .sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
                                        .pApplicationInfo = &infos,
@@ -49,6 +50,7 @@ VkhApp vkh_app_create (const char* app_name, int ext_count, const char* extentio
                                        .ppEnabledLayerNames = enabledLayers };
 
     VK_CHECK_RESULT(vkCreateInstance (&inst_info, NULL, &app->inst));
+    app->infos = infos;
     return app;
 }
 
index d42eaa21685d8aae3b4fccf231ff3d6c2dea94d9..aeb16a717e5b319c86624e17bce7d60282d1afb1 100644 (file)
@@ -27,6 +27,7 @@ extern "C" {
 #endif
 
 #include "vkh.h"
+#include "vk_mem_alloc.h"
 
 typedef struct _vkh_buffer_t {
     VkhDevice               pDev;
index 1b5b1bf6cc891649c8cd7c5d8284f09e9985aba1..2b3b8016181253d780c6e88a64bacf31a8db6fa7 100644 (file)
@@ -27,6 +27,7 @@ extern "C" {
 #endif
 
 #include "vkh.h"
+#include "vk_mem_alloc.h"
 
 typedef struct _vkh_device_t{
     VkDevice                           dev;
index 397e5cdde88db9eaea15a9ba8978fed961702959..88075f49afbe9729fa59bfb4b6dab6522e93a59d 100644 (file)
@@ -27,6 +27,7 @@ extern "C" {
 #endif
 
 #include "vkh.h"
+#include "vk_mem_alloc.h"
 
 typedef struct _vkh_image_t {
     VkhDevice                          pDev;