Skip to main content

A 1:1 raw Python binding to Direct3D 12

Project description

PyD3D12 Module for Python


Overview

This module provides a 1-1 binding of Direct3D12 to Python, with a similar experience as C++ bindings. It is designed to be used with the Python programming language and provides a raw interface for working with Direct3D12.

Installation

To install the PyD3D12 module, you can use pip:

pip install PyD3D12

Required Architecture

The PyD3D12 module requires a 64-bit architecture to function properly. It is not compatible with 32-bit systems. OS = Windows 10 or later Python = 3.8 or later

Recommended Components

  • GPU: NVIDIA GeForce RTX 20 series or later, AMD Radeon RX 5000 series or later, or Intel Iris Xe Graphics or later.
  • DirectX: DirectX 12 or later.
  • CPU: Intel Core i5 or AMD Ryzen 5 or better.
  • RAM: 8 GB or more.
  • Storage: SSD with at least 1 GB of free space.
  • Graphics Driver: Latest graphics driver from the GPU manufacturer (NVIDIA, AMD, or Intel).

No Abstractions!

This module provides a raw interface to Direct3D12, meaning that it does not provide any abstractions or higher-level functionality. It is designed to be used by developers who are familiar with Direct3D12 and want to work with it directly in Python.

Usage

To use the PyD3D12 module, you can import it in your Python code:

import PyD3D12
# Example usage
device = PyD3D12.D3D12CreateDevice()
# Create a command queue
command_queue = device.CreateCommandQueue(PyD3D12.D3D12_COMMAND_LIST_TYPE_DIRECT)
# Create a command allocator
command_allocator = device.CreateCommandAllocator(PyD3D12.D3D12_COMMAND_LIST_TYPE_DIRECT)
# Create a command list
command_list = device.CreateCommandList(0, PyD3D12.D3D12_COMMAND_LIST_TYPE_DIRECT, command_allocator, None)
# Close the command list
command_list.Close()

It is best to alias the module as dx for convenience:

import PyD3D12 as dx

If there are conflicting Direct3D bindings, use dx12 but it's best to deprecate older versions for consistency.

https://pypi.org/project/PyD3D12/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyd3d12-2.1.2.tar.gz (144.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyd3d12-2.1.2-py3-none-any.whl (151.6 kB view details)

Uploaded Python 3

File details

Details for the file pyd3d12-2.1.2.tar.gz.

File metadata

  • Download URL: pyd3d12-2.1.2.tar.gz
  • Upload date:
  • Size: 144.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for pyd3d12-2.1.2.tar.gz
Algorithm Hash digest
SHA256 60e01763eee1e16c3066696b81c9ec104eaf85766f4d538d617cfcf94b55f498
MD5 0274fcb9dbe9467dd1783c25e2ecc2f5
BLAKE2b-256 db4559f9e5b2fc7fb35f1388f773d5af34313f8cbe3228797509ad9788d27cf4

See more details on using hashes here.

File details

Details for the file pyd3d12-2.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyd3d12-2.1.2-py3-none-any.whl
  • Upload date:
  • Size: 151.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for pyd3d12-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4fa4b2608757a9fc13a6c6fb64de67f31795b9283868609ca37eb5960347062d
MD5 b56cb2d7919eab2f6f7909b8642be6d4
BLAKE2b-256 6fe4e163ecdf000c1d6970a1ed2a3c91ef166435eafdad489c06cf304fffafdd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page