Arthuchaut / pysics

A GUI framework for creating some physics simulations
MIT License
0 stars 0 forks source link

Rework the global architecture to handle multiple types of graphics API #7

Open Arthuchaut opened 2 years ago

Arthuchaut commented 2 years ago

The base subject is that I would like to use the Vulkan API that is the next OpenGL specifications.

The problem is that I don't really know how to manage the C++ implementation of Vk with Python right now (especially with the MoltenVk wrapper for MacOS systems). I had figure about CFFI and PyBind11 but I need a lot more time to perfectly understand what I am doin' with these tools and how to handle them.

So why using a graphic API static dependency instead of a more modular architecture? The basic idea is to create an abstract layer between the graphic API and the Pysics engine that will be basically... an API. This intermediate API will offers generic methods to handle all the needed renders (see the basic schema bellow).

Untitled Diagram drawio (4)

To work, I need to write the layered API specifications, with all methods names, there parameters and return value. This solution will permit me to go forward with OpenGL, allowing me the time to manage the other graphics API.