Jump to content
  • Advertisement
Sign in to follow this  

Glfw3.2 bindings for c#

This topic is 558 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My question is are there any maintained glfw3.2 bindings for C# which also has support for Vulkan. I can't find any that has supports both.

Share this post

Link to post
Share on other sites

I am not sure about any ready-made wrappers.

However, my Vulkan backend which uses glfw contains only about 10-15 glfw function calls. That should get you up and running with a render window and Vulkan compatible surface. Seems to me like it would be fairly easy to make a small C# wrapper yourself for only what you need to get started. Seeing as glfw is a C library it should be straightforward to import the C functions using DLLImport or something similar. You can then add more functions from the glfw API as needed. That said, I am not sure if the Vulkan API itself is easily usable from C#.

Share this post

Link to post
Share on other sites

I'm sure I'm misunderstanding this, but because the PhysicalDevice class is implementing IMarshalling, it should have a method called Handle which returns an IntPtr, but it don't see it in the class.

 public interface IMarshalling
        IntPtr Handle { get; }
public class PhysicalDevice : IMarshalling
        public IntPtr AcquireXlibDisplayEXT(DisplayKhr display);
        public Device CreateDevice(DeviceCreateInfo pCreateInfo, AllocationCallbacks pAllocator = null);
        public DisplayModeKhr CreateDisplayModeKHR(DisplayKhr display, DisplayModeCreateInfoKhr pCreateInfo, AllocationCallbacks pAllocator = null);
        public ExtensionProperties[] EnumerateDeviceExtensionProperties(string pLayerName = null);
        public LayerProperties[] EnumerateDeviceLayerProperties();
        public DisplayModePropertiesKhr[] GetDisplayModePropertiesKHR(DisplayKhr display);
        public DisplayPlaneCapabilitiesKhr GetDisplayPlaneCapabilitiesKHR(DisplayModeKhr mode, uint planeIndex);
        public DisplayPlanePropertiesKhr[] GetDisplayPlanePropertiesKHR();
        public DisplayKhr[] GetDisplayPlaneSupportedDisplaysKHR(uint planeIndex);
        public DisplayPropertiesKhr[] GetDisplayPropertiesKHR();
        public ExternalImageFormatPropertiesNv GetExternalImageFormatPropertiesNV(Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags = 0, ExternalMemoryHandleTypeFlagsNv externalHandleType = 0);
        public PhysicalDeviceFeatures GetFeatures();
        public PhysicalDeviceFeatures2Khr GetFeatures2KHR();
        public FormatProperties GetFormatProperties(Format format);
        public FormatProperties2Khr GetFormatProperties2KHR(Format format);
        public void GetGeneratedCommandsPropertiesNVX(out DeviceGeneratedCommandsFeaturesNvx pFeatures, out DeviceGeneratedCommandsLimitsNvx pLimits);
        public ImageFormatProperties GetImageFormatProperties(Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags = 0);
        public ImageFormatProperties2Khr GetImageFormatProperties2KHR(PhysicalDeviceImageFormatInfo2Khr pImageFormatInfo);
        public PhysicalDeviceMemoryProperties GetMemoryProperties();
        public PhysicalDeviceMemoryProperties2Khr GetMemoryProperties2KHR();
        public PhysicalDeviceProperties GetProperties();
        public PhysicalDeviceProperties2Khr GetProperties2KHR();
        public QueueFamilyProperties[] GetQueueFamilyProperties();
        public QueueFamilyProperties2Khr[] GetQueueFamilyProperties2KHR();
        public void GetRandROutputDisplayEXT(out IntPtr dpy, uint rrOutput, out DisplayKhr pDisplay);
        public SparseImageFormatProperties[] GetSparseImageFormatProperties(Format format, ImageType type, SampleCountFlags samples, ImageUsageFlags usage, ImageTiling tiling);
        public SparseImageFormatProperties2Khr[] GetSparseImageFormatProperties2KHR(PhysicalDeviceSparseImageFormatInfo2Khr pFormatInfo);
        public SurfaceCapabilities2Ext GetSurfaceCapabilities2EXT(SurfaceKhr surface);
        public SurfaceCapabilitiesKhr GetSurfaceCapabilitiesKHR(SurfaceKhr surface);
        public SurfaceFormatKhr[] GetSurfaceFormatsKHR(SurfaceKhr surface);
        public PresentModeKhr[] GetSurfacePresentModesKHR(SurfaceKhr surface);
        public Bool32 GetSurfaceSupportKHR(uint queueFamilyIndex, SurfaceKhr surface);
        public void ReleaseDisplayEXT(DisplayKhr display);

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!