The project is split into several parts:
- The kernel driver, with simple 3D command forwarding and 3D resource allocation
- The userland driver, in fact the OpenGL backend
- The reference, explaining virtio-gpu commands
#!/bin/bash | |
# Written by Antony Lee (@anntzer). | |
set -e | |
PYTHON_VERSION=36 | |
PIP="/opt/python/cp$PYTHON_VERSION-cp${PYTHON_VERSION}m/bin/pip" | |
if ! [[ -e "$PIP" ]]; then | |
# Not in the manylinux image yet: call self from within docker. | |
docker run -it \ |
#!/usr/bin/env python | |
# Copyright (c) 2017 Kurt Jacobson | |
# License: https://kcj.mit-license.org/@2017 | |
import os | |
import gi | |
gi.require_version('Gtk', '3.0') | |
gi.require_version('Gdk', '3.0') |
// This will works on Embedded GPU that implements .gem_prime_mmap like Rockchip ones. | |
// This will fail on most DRM drivers for GPU with dedicated memory as they tend to NOT implement .gem_prime_mmap. | |
#include <stdio.h> | |
#include <libdrm/drm.h> | |
#include <stdint.h> | |
#include <sys/mman.h> | |
#include <string.h> |
The project is split into several parts:
version: "2" | |
services: | |
my-wpdb: | |
image: mariadb | |
ports: | |
- "8081:3306" | |
environment: | |
MYSQL_ROOT_PASSWORD: ChangeMeIfYouWant | |
volumes: | |
- mariadb:/var/lib/mysql |
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
#!/usr/bin/python | |
from __future__ import print_function | |
import os | |
import sys | |
import OpenGL | |
# OpenGL.USE_ACCELERATE = False | |
# OpenGL.ERROR_CHECKING = False | |
from OpenGL.GLUT import * | |
from OpenGL.GLU import * |
Generating an environment on Linux to cross-compile QT applications for a Raspberry Pi running Debian Wheezy:
Grab tools (for the cross-compiler tool chain) and firmware (for the OpenGL libraries) from the Raspberry Pi GitHub repository:
git clone https://github.com/raspberrypi/tools.git --depth=1
git clone https://github.com/raspberrypi/firmware.git --depth=1
Copy OpenGL stuff to the toolchain's sysroot:
// HLSL does allow initializing sampler states with a syntax | |
// like this. However the state settings themselves are nowhere | |
// to be found in the compiled shader bytecode (as of d3dcompiler_47.dll | |
// 10.0.14393 from Win10 SDK), and can't be accessed via ID3D11ShaderReflection | |
// either. | |
// | |
// Looks like the compiler only emits the sampler default values if compiling | |
// the deprecated "effect file" target. | |
// | |
// SAD! |
export CFLAGS=-Qunused-arguments | |
export CPPFLAGS=-Qunused-arguments | |
pip install cython | |
brew install liblo | |
pip install -r requirements.txt | |
python setup.py install | |
pip install pygame | |
brew install portmidi |