Skip to content

glfw.c3l and vulkan.c3l are incompatible #90

@fesoliveira014

Description

@fesoliveira014

Hi there, the vendor glfw.c3l and vulkan.c3l seem to be incompatible with each other. glfw.c3l seems to have been developed with a different Vulkan binding, and using them together causes some issues.

gflw.c3l depends on Vulkan bindings for declaring 3 functions:

import vulkan;

fn GlfwVkProc getInstanceProcAddress(vk::Instance instance, ZString procname) 
  @cname("glfwGetInstanceProcAddress");

fn int getPhysicalDevicePresentationSupport(vk::Instance instance, vk::PhysicalDevice device, uint queuefamily) 
  @cname("glfwGetPhysicalDevicePresentationSupport");

fn vk::Result createWindowSurface(vk::Instance instance, GlfwWindow* window, vk::AllocationCallbacks* allocator, vk::SurfaceKHR* surface) 
  @cname("glfwCreateWindowSurface");

Here glfw.c3l expects Vulkan types to be declared as vk::Instance, vk::Result, etc. However, vulkan.c3l declares them as vk::VkInstance, vk::VkResult, etc. That can be easily fixed by changing the glfw.c3l types to match the vulkan.c3l types, but there is no vulkan.c3l equivalent for vk::SurfaceKHR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions