mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Correct vulkan headers
This commit is contained in:
@@ -262,6 +262,7 @@ def parse_constants(f):
|
|||||||
|
|
||||||
|
|
||||||
def parse_enums(f):
|
def parse_enums(f):
|
||||||
|
f.write("import \"core:c\"\n\n")
|
||||||
f.write("// Enums\n")
|
f.write("// Enums\n")
|
||||||
|
|
||||||
data = re.findall(r"typedef enum Vk(\w+) {(.+?)} \w+;", src, re.S)
|
data = re.findall(r"typedef enum Vk(\w+) {(.+?)} \w+;", src, re.S)
|
||||||
@@ -467,6 +468,7 @@ def parse_procedures(f):
|
|||||||
|
|
||||||
max_len = max(len(n) for n, t in ff)
|
max_len = max(len(n) for n, t in ff)
|
||||||
|
|
||||||
|
f.write("import \"core:c\"\n\n")
|
||||||
f.write("// Procedure Types\n\n");
|
f.write("// Procedure Types\n\n");
|
||||||
for n, t in ff:
|
for n, t in ff:
|
||||||
f.write("{} :: #type {}\n".format(n.ljust(max_len), t.replace('"c"', '"system"')))
|
f.write("{} :: #type {}\n".format(n.ljust(max_len), t.replace('"c"', '"system"')))
|
||||||
@@ -587,6 +589,8 @@ MAX_GLOBAL_PRIORITY_SIZE_EXT :: 16
|
|||||||
with open("../structs.odin", 'w', encoding='utf-8') as f:
|
with open("../structs.odin", 'w', encoding='utf-8') as f:
|
||||||
f.write(BASE)
|
f.write(BASE)
|
||||||
f.write("""
|
f.write("""
|
||||||
|
import "core:c"
|
||||||
|
|
||||||
when ODIN_OS == "windows" {
|
when ODIN_OS == "windows" {
|
||||||
\timport win32 "core:sys/windows"
|
\timport win32 "core:sys/windows"
|
||||||
|
|
||||||
|
|||||||
Vendored
+2
@@ -3,6 +3,8 @@
|
|||||||
//
|
//
|
||||||
package vulkan
|
package vulkan
|
||||||
|
|
||||||
|
import "core:c"
|
||||||
|
|
||||||
// Enums
|
// Enums
|
||||||
AccelerationStructureBuildTypeKHR :: enum c.int {
|
AccelerationStructureBuildTypeKHR :: enum c.int {
|
||||||
HOST = 0,
|
HOST = 0,
|
||||||
|
|||||||
Vendored
+2
@@ -3,6 +3,8 @@
|
|||||||
//
|
//
|
||||||
package vulkan
|
package vulkan
|
||||||
|
|
||||||
|
import "core:c"
|
||||||
|
|
||||||
// Procedure Types
|
// Procedure Types
|
||||||
|
|
||||||
ProcAllocationFunction :: #type proc "system" (pUserData: rawptr, size: int, alignment: int, allocationScope: SystemAllocationScope) -> rawptr
|
ProcAllocationFunction :: #type proc "system" (pUserData: rawptr, size: int, alignment: int, allocationScope: SystemAllocationScope) -> rawptr
|
||||||
|
|||||||
Vendored
+2
@@ -3,6 +3,8 @@
|
|||||||
//
|
//
|
||||||
package vulkan
|
package vulkan
|
||||||
|
|
||||||
|
import "core:c"
|
||||||
|
|
||||||
when ODIN_OS == "windows" {
|
when ODIN_OS == "windows" {
|
||||||
import win32 "core:sys/windows"
|
import win32 "core:sys/windows"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user