Git Product home page Git Product logo

go-vk's People

Contributors

bbredesen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

go-vk's Issues

Go-like handling of pNext in Vulkanize()

Extending structures through pNext is very awkward right now, requiring the developer to set up the structure, call Vulkanize() on it, and then cast the result to unsafe.Pointer before assigning to the base structure.

The XML spec includes a "structextends" property, showing what other structs can be extended with this one. (Note that there could be multiple types, separated by commas.)

For example, VkPhysicalDeviceFeatures2 is extended by many feature extensions like VkPhysicalDevicePrivateDataFeatures, VkPhysicalDeviceVariablePointersFeatures, VkPhysicalDeviceMultiviewFeatures, etc. Each of those public-facing structs could implement a guard interface called PhysicalDeviceFeaturres2Extender (or similar), and then vk.PhysicalDeviceFeatures2.PNext would have its type set to that interface. The Vulkanize function would then handle the recursive Vulkanization and casting to unsafe.Pointer behind the scenes.

Note that there are also 70+ "returnedonly" structs that extend other structs. The fix above does NOT address structs returned from Vulkan.

Linux extensions missing

The readme states that go-vk is untested on Linux, but it's currently not possible to use it at all: All surface extensions are missing. I can see that vk-gen contains the necessary platform mappings, but I don't see any files in go-vk that contain the resulting enums, commands and data structures.

Could you please make sure that all Linux-specific platform code is included in go-vk?

Thanks!

add purego version

Well, I am not expert to vulkan, but there is ebiten/purego project, which can dlopen C - shared library and call func without cgo, I think that would be nice to implement ...

create surface error

windows 11
golang 1.20
glfw v3.3

window, err := glfw.CreateWindow(800, 600, "vulkan", nil, nil)
instance, err := vk.CreateInstance(&createInfo, nil)
ptr, err := window.CreateWindowSurface(instance, nil)

call window.CreateWindowSurface, it report an error:
vulkan: instance is not a VkInstance (expected kind Ptr, got uintptr)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.