-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding in the vulkan create info and vulkan debugger
- Loading branch information
Showing
16 changed files
with
193 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"files.associations": { | ||
"cmemory.h": "c", | ||
"darray.h": "c", | ||
"asserts.h": "c" | ||
}, | ||
"editor.cursorStyle": "block", | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "core/cstring.h" | ||
#include "core/cmemory.h" | ||
|
||
#include <string.h> | ||
|
||
u64 string_length(const char* str) { | ||
return strlen(str); | ||
} | ||
|
||
char* string_duplicate(const char* str) { | ||
u64 length = string_length(str); | ||
char* copy = callocate(length + 1, MEMORY_TAG_STRING); | ||
ccopy_memory(copy, str, length + 1); | ||
return copy; | ||
} | ||
|
||
// Case-sensitive string comparison. True if the same, otherwise false. | ||
b8 strings_equal(const char* str0, const char* str1) { | ||
return strcmp(str0, str1) == 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
|
||
#include "defines.h" | ||
|
||
// Returns the length of the given string. | ||
KAPI u64 string_length(const char* str); | ||
|
||
KAPI char* string_duplicate(const char* str); | ||
|
||
// Case-sensitive string comparison. True if the same, otherwise false. | ||
KAPI b8 strings_equal(const char* str0, const char* str1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#pragma once | ||
|
||
#include "defines.h" | ||
|
||
void platform_get_required_extension_names(const char*** names_darray); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
#pragma once | ||
|
||
#include "defines.h" | ||
#include "core/asserts.h" | ||
|
||
#include <vulkan/vulkan.h> | ||
|
||
#define VK_CHECK(expr) \ | ||
{ \ | ||
CASSERT(expr == VK_SUCCESS); \ | ||
} | ||
|
||
typedef struct vulkan_context { | ||
VkInstance instance; | ||
VkAllocationCallbacks* allocator; | ||
|
||
#if defined(_DEBUG) | ||
VkDebugUtilsMessengerEXT debug_messenger; | ||
#endif | ||
} vulkan_context; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters