Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //(I)
- #define INSTANCE_LAYER_COUNT 2
- const char *g_pInstanceLayers[] = {"VK_LAYER_NV_optimus","VK_LAYER_LUNARG_standard_validation"};
- //#define INSTANCE_LAYER_COUNT 0
- //const char *g_pInstanceLayers[] = {0};
- #if INSTANCE_LAYER_COUNT > 0
- // somFunc(...,INSTANCE_LAYER_COUNT,...);
- #endif
- //(II)
- const char *g_pInstanceLayers[] = {"VK_LAYER_NV_optimus","VK_LAYER_LUNARG_standard_validation"};
- int nNumberOfEllements = 0;
- nNumberOfEllements = sizeof(g_pInstanceLayers) / sizeof(char*);
- //or nNumberOfEllements = sizeof(g_pInstanceLayers) / sizeof(g_pInstanceLayers[0]);
- printf("Number of ellements in the g_pInstanceLayers array is %d\n", nNumberOfEllements);
- if(nNumberOfEllements)
- {
- // somFunc(...,nNumberOfEllements,...);
- }
Advertisement
Add Comment
Please, Sign In to add comment