Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <vulkan/vulkan.h>
- int main (int argc, char **argv)
- {
- /*
- from VulkanSDK
- typedef union VkClearColorValue {
- float float32[4];
- int32_t int32[4];
- uint32_t uint32[4];
- } VkClearColorValue;
- typedef struct VkClearDepthStencilValue {
- float depth;
- uint32_t stencil;
- } VkClearDepthStencilValue;
- typedef union VkClearValue {
- VkClearColorValue color;
- VkClearDepthStencilValue depthStencil;
- } VkClearValue;
- */
- VkClearValue clearValue[]={
- {0.1f,0.2f,0.3f,1.0f},
- {1.0,0}
- };
- printf("clearValue[0] (0): %f\n",clearValue[0].color.float32[0]);
- printf("clearValue[0] (1): %f\n",clearValue[0].color.float32[1]);
- printf("clearValue[0] (2): %f\n",clearValue[0].color.float32[2]);
- printf("clearValue[0] (3): %f\n",clearValue[0].color.float32[3]);
- printf("clearValue[1] (0): %f\n",clearValue[1].depthStencil.depth);
- printf("clearValue[1] (1): %d\n\n",clearValue[1].depthStencil.stencil);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement