Git Product home page Git Product logo

Comments (6)

LinuxLegend avatar LinuxLegend commented on May 23, 2024 1

I may take on that task as I have a need to remove all C++ libraries/dependencies from my other projects using Vkvg.

from vkvg.

jpbruyere avatar jpbruyere commented on May 23, 2024

Yes, I know, since I've implemented vma (vulkan mem allocator) which is a c++ source, the final linkage is c++. I have to implement my own allocator. I should add a note on the first page maybe.

from vkvg.

LinuxLegend avatar LinuxLegend commented on May 23, 2024

Update on this, I have figured out the ground work for this project. Essentially, I have to refactor vk_mem_alloc.h file by translating template codes into macro-equivalence and write single inheritance VTable system for classes (C-style Vtable wouldn't easily support multi-inheritance so you may have to be careful there.) vk_mem_alloc.h file is pretty big as it is about 17,000 lines and should be broken up to at least 40 files.

from vkvg.

jpbruyere avatar jpbruyere commented on May 23, 2024

we may also create our own allocator for vkvg, distributing memory from shared pools in vkvgDevice. Translating vma to c should be done by code generation, but I don't know if it worth doing it and maintain a c version of vma in parallel...

from vkvg.

LinuxLegend avatar LinuxLegend commented on May 23, 2024

I personally don't know of any C++ to C translation program that works and LLVM depreciated the "C" compilation target for their LLC compiler so that one is out.

Basically in C++ to C process that I plan on doing is utilizing this idea from proof of concept: https://github.com/LinuxLegend/TestVTable

from vkvg.

jpbruyere avatar jpbruyere commented on May 23, 2024

I was suggesting making the translation by automation (self made code gen), but if you want to start a vma c implementation with your vtable lib, that would be surely a nice exercise for you and a test case your lib. If you make it, it could be implemented as an optional feature. But a dedicated custom allocator for vkvg is a feature I will test.

from vkvg.

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.