Giter VIP home page Giter VIP logo

Comments (12)

adam-sawicki-a avatar adam-sawicki-a commented on August 15, 2024

Creating wrapper for Python is a great idea, but I'm afraid that creating wrappers for programming languages other than C++ is out of scope of this project. External contributions of this type are welcomed.

I would recommend to wait with creating such wrapper until new version 2.0.0-alpha.3 is released, which should happen pretty soon. It brings a lot of changes.

from vulkanmemoryallocator.

realitix avatar realitix commented on August 15, 2024

Thanks @adam-sawicki-amd for your answer.
I agree with you that creating a wrapper is out of scope of this project. However, creating a file that describes the API may be a good idea. Like you said, it takes time to do it and we have to wait the version 2-alpha3.
I can create the wrapper without the description file so it's not a big problem but it's more convenient with it.

from vulkanmemoryallocator.

adam-sawicki-a avatar adam-sawicki-a commented on August 15, 2024

I pushed version 2.0.0-alpha.3. Can you try to prepare Python wrapper for it?

from vulkanmemoryallocator.

realitix avatar realitix commented on August 15, 2024

Thanks @adam-sawicki-amd, can you give me instruction to compile the code as a static library ?

from vulkanmemoryallocator.

adam-sawicki-a avatar adam-sawicki-a commented on August 15, 2024

If you mean Windows and Visual Studio platform, in order to compile VMA as static library:

  • Create new project of type "Static library".
  • Add vk_mem_alloc.h file to it.
  • Create vk_mem_alloc.cpp file and place following code there:
#define VMA_IMPLEMENTATION
#include "vk_mem_alloc.h"

from vulkanmemoryallocator.

realitix avatar realitix commented on August 15, 2024

Sorry, I forgot to tell you that I work on Linux (Ubuntu). So do you know how to do it on linux ?

from vulkanmemoryallocator.

realitix avatar realitix commented on August 15, 2024

I just saw that all is in one file vk_mem_alloc.h, nice!
Is mathfu mandatory ?

from vulkanmemoryallocator.

adam-sawicki-a avatar adam-sawicki-a commented on August 15, 2024

Yes, the whole library is in file vk_mem_alloc.h. It depends only on Vulkan and standard C/C++ library. When included as-is, it works as a header. When included after #define VMA_IMPLEMENTATION from some CPP file, it adds whole implementation, so you should do it just once. All the rest is just testing app, including MathFu.

from vulkanmemoryallocator.

realitix avatar realitix commented on August 15, 2024

Ok very nice, I love well designed library. I'm starting the wrapper.

from vulkanmemoryallocator.

FlayaN avatar FlayaN commented on August 15, 2024

@realitix Are you making the vma.xml file or directly for python?
I would love a spec aswell to make a version of KhronosGroup/Vulkan-Hpp for this repo

So I can use this library like this:

auto memReq = vma::AllocationCreateInfo({}, vma::MemoryUsage::eGpuOnly)
   .setPool(&pool);

etc..

from vulkanmemoryallocator.

realitix avatar realitix commented on August 15, 2024

@FlayaN I am directly doing the python wrapper for testing.
If it's good, we should capitalize on the xml file.

I'm currently locked by this: #10

from vulkanmemoryallocator.

realitix avatar realitix commented on August 15, 2024

Here the Python Wrapper (WIP): https://github.com/realitix/pyvma

from vulkanmemoryallocator.

Related Issues (20)

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.