glnext
High-Performance offscreen rendering for python.
pip install glnext
Examples
import glnext
from glnext_compiler import glsl
from PIL import Image
instance = glnext.instance()
task = instance.task()
framebuffer = task.framebuffer((512, 512))
pipeline = framebuffer.render(
vertex_shader=glsl('''
#version 450
#pragma shader_stage(vertex)
layout (location = 0) in vec2 in_vert;
layout (location = 1) in vec3 in_color;
layout (location = 0) out vec3 out_color;
void main() {
gl_Position = vec4(in_vert, 0.0, 1.0);
out_color = in_color;
}
'''),
fragment_shader=glsl('''
#version 450
#pragma shader_stage(fragment)
layout (location = 0) in vec3 in_color;
layout (location = 0) out vec4 out_color;
void main() {
out_color = vec4(in_color, 1.0);
}
'''),
vertex_format='2f 3f',
vertex_count=3,
)
pipeline.update(
vertex_buffer=glnext.pack([
-0.5, -0.5, 0.0, 0.0, 1.0,
0.5, -0.5, 0.0, 1.0, 0.0,
0.0, 0.5, 1.0, 0.0, 0.0,
])
)
task.run()
data = framebuffer.output[0].read()
img = Image.frombuffer('RGBA', (512, 512), data)
img.save('hello_world.png')
Windows
With up2date drivers the vulkan runtime binaries should already be on your system. Install the vulkan-sdk if needed.
Linux
Install the vulkan-sdk.
apt-get install libx11-dev
Without GPU
This project is compatible with swiftshader. The CI also runs on pure CPU. (Dockerfile)
Metadata
Release files for glnext 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| glnext-0.8.1.tar.gz | 113.9 kB | Without provenance | Details for glnext-0.8.1.tar.gz |
Built distributions (wheels)
Total release size: 909.8 kB
Release files / glnext-0.8.1.tar.gz
| Download URL | glnext-0.8.1.tar.gz |
|---|---|
| Size | 113.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3c4d673be31329435aee53f835e8bd221f8b707f147720b22910681da8a3c69
|
|
BLAKE2b-256 checksum How to use checksums |
91cf00d4c873574699fc62d55ee12d738f9b81b00a823736603402ebe87b5093
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / glnext-0.8.1-cp39-cp39-win_amd64.whl
| Download URL | glnext-0.8.1-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 37.5 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0b72d1148e278f53be46f9290f57367d04c852344edad64702a2a05102217ed2
|
|
BLAKE2b-256 checksum How to use checksums |
4d7c8f41425be50dee5f158a8a59cd8682eede481f316054af03b299fb26c95c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / glnext-0.8.1-cp39-cp39-manylinux1_x86_64.whl
| Download URL | glnext-0.8.1-cp39-cp39-manylinux1_x86_64.whl |
|---|---|
| Size | 162.0 kB |
| Tags | CPython 3.9 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
3c1740680b9073e26ff23b9260ee136b500cf6156ea20a46bd54af8bc59768de
|
|
BLAKE2b-256 checksum How to use checksums |
fba4c08c87ab901f8757f5201ecf817c8bb4bc93ce8135a2a2befc2fff39d5f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / glnext-0.8.1-cp38-cp38-win_amd64.whl
| Download URL | glnext-0.8.1-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 37.7 kB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f0201127b8600b4a005f444d27c9832c450c58a05acd7741e46a84a1309d68ff
|
|
BLAKE2b-256 checksum How to use checksums |
323384395de7ce72506a30be4c8e9702119ac1ce2c38e9b6bec84ce0f4ac8679
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / glnext-0.8.1-cp38-cp38-manylinux1_x86_64.whl
| Download URL | glnext-0.8.1-cp38-cp38-manylinux1_x86_64.whl |
|---|---|
| Size | 162.1 kB |
| Tags | CPython 3.8 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
fc54590ca3d63792757913bdcc325267c58cc9d999baea29cbc320233bab8502
|
|
BLAKE2b-256 checksum How to use checksums |
650d01e371331dd441462bf44cfdaa2681c096725e0cf89f01fb0e7f76c1b63b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / glnext-0.8.1-cp37-cp37m-win_amd64.whl
| Download URL | glnext-0.8.1-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 37.5 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
65c21d7ce4b8594cd1cd6610e2f133e976e3531384e6227bb3580a5fafd5ecf5
|
|
BLAKE2b-256 checksum How to use checksums |
e74451388c6ec60310713830295feead2f6b7b62762c87f0528e89476458c0a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / glnext-0.8.1-cp37-cp37m-manylinux1_x86_64.whl
| Download URL | glnext-0.8.1-cp37-cp37m-manylinux1_x86_64.whl |
|---|---|
| Size | 161.3 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
96cf7fe966109d36b961f212ddef1c5f8fdfede6e36cffc43d9bef920effc6e7
|
|
BLAKE2b-256 checksum How to use checksums |
c51cbe2a5b7d04fe420830c84cb3bc2e163d7ad4ac78e2ca807eea7272e896fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / glnext-0.8.1-cp36-cp36m-win_amd64.whl
| Download URL | glnext-0.8.1-cp36-cp36m-win_amd64.whl |
|---|---|
| Size | 37.5 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6c7a6f1e5d3cbfb8c67bcb137f96ce5be2f909a18c82369de44d3305a02ffe2a
|
|
BLAKE2b-256 checksum How to use checksums |
b3d8ec716169946821587b878518198ce9fe5d4bf35eeec7338e683c9ef96b2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / glnext-0.8.1-cp36-cp36m-manylinux1_x86_64.whl
| Download URL | glnext-0.8.1-cp36-cp36m-manylinux1_x86_64.whl |
|---|---|
| Size | 160.4 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
ed76d3a0aeedb87fb4f614218b27b3dde3931bd5e16d385ce0decaf6b79ba944
|
|
BLAKE2b-256 checksum How to use checksums |
97cebfa7f1eb7cf233be0c9347757fbb3d6c96dbc7aaa4ba2055e355da4b30b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Security for glnext 0.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.