Graphics

From Things and Stuff Wiki
Jump to navigation Jump to search


General

See also 3D / CAD, Photography, JS scripts#Graphics, WYSIWYG


Hardware


VBIOS

  • https://en.wikipedia.org/wiki/Video_BIOS - the BIOS of a graphics card in a (usually IBM PC-derived) computer. Much the way the system BIOS provides a set of functions that are used by software programs to access the system hardware, the video BIOS provides a set of video-related functions that are used by programs to access the video hardware. The video BIOS interfaces software to the video chipset in the same way that the system BIOS does for the system chipset. The ROM also contained a basic font set to upload to the video adapter font RAM, if the video card did not contain a font ROM with this font set instead.


  • https://en.wikipedia.org/wiki/VESA_BIOS_Extensions - a VESA standard, currently at version 3, that defines the interface that can be used by software to access compliant video boards at high resolutions and bit depths. This is opposed to the "traditional" int 10h BIOS calls, which are limited to resolutions of 640×480 pixels with 16 color (4-bit) depth or less. VBE is made available through the video card's BIOS, which installs during boot up some interrupt vectors that point to itself.

Most newer cards implement the more capable VBE 3.0 standard. Older versions of VBE provide only a real mode interface, which cannot be used without a significant performance penalty from within protected mode operating systems. Consequently, the VBE standard has almost never been used for writing a video card's drivers; each vendor has thus had to invent a proprietary protocol for communicating with its own video card. Despite this, it is common that a driver thunk out to the real mode interrupt in order to initialize screen modes and gain direct access to a card's linear frame buffer, because these tasks would otherwise require handling many hundreds of proprietary variations that exist from card to card.

Display standards


  • https://en.wikipedia.org/wiki/Color_Graphics_Adapter - originally also called the Color/Graphics Adapter or IBM Color/Graphics Monitor Adapter,[1] introduced in 1981, was IBM's first graphics card and first color display card for the IBM PC. For this reason, it also became that computer's first color computer display standard.The standard IBM CGA graphics card was equipped with 16 kilobytes of video memory and could be connected either to a dedicated direct-drive CRT monitor using a 4-bit digital (TTL) RGBI interface, such as the IBM 5153 color display, or to an NTSC-compatible television or composite video monitor via an RCA connector.[2] The RCA connector provided only baseband video, so to connect the CGA card to a standard television set required a separate RF modulator unless the TV had an RCA jack, although doing so with the former combined with an amplifier was sometimes more practical, since one could then hook up an antenna to the amplifier and get wireless video.


Framebuffer

  • https://en.wikipedia.org/wiki/Framebuffer - frame buffer, or sometimes framestore, is a portion of RAM containing a bitmap that drives a video display. It is a memory buffer containing a complete frame of data. Modern video cards contain framebuffer circuitry in their cores. This circuitry converts an in-memory bitmap into a video signal that can be displayed on a computer monitor.

In computing, a screen buffer is a part of computer memory used by a computer application for the representation of the content to be shown on the computer display. The screen buffer may also be called the video buffer, the regeneration buffer, or regen buffer for short. Screen buffers should be distinguished from video memory. To this end, the term off-screen buffer is also used.

The information in the buffer typically consists of color values for every pixel to be shown on the display. Color values are commonly stored in 1-bit binary (monochrome), 4-bit palettized, 8-bit palettized, 16-bit high color and 24-bit true color formats. An additional alpha channel is sometimes used to retain information about pixel transparency. The total amount of memory required for the framebuffer depends on the resolution of the output signal, and on the color depth or palette size.


  • https://en.wikipedia.org/wiki/Linux_framebuffer - fbdev is a graphic hardware-independent abstraction layer to show graphics on a computer monitor, typically on the console. The word framebuffer means a part of video memory containing a current video frame, and the Linux framebuffer means “access method to the framebuffer under the Linux kernel”, without relying on system-specific libraries such as SVGALib or another user space software.




Startup

  • fbsplash - formerly gensplash, is a userspace implementation of a splash screen for Linux systems. It provides a graphical environment during system boot using the Linux framebuffer layer.
Q: "I get a tty1 login before KDM pops up."
A: "You could disable tty1. Comment out this line in /etc/inittab: 
  c1:2345:respawn:/sbin/agetty -8 38400 tty1 linux"


DirectFB

  • directfb.net - a thin library that provides hardware graphics acceleration, input device handling and abstraction, integrated windowing system with support for translucent windows and multiple display layers, not only on top of the Linux Framebuffer Device. It is a complete hardware abstraction layer with software fallbacks for every graphics operation that is not supported by the underlying hardware. DirectFB adds graphical power to embedded systems and sets a new standard for graphics under Linux. [3]


  • fbv - a very simple graphic file viewer for the framebuffer console, capable of displaying GIF, JPEG, PNG and BMP files using libungif, libjpeg, and libpng. The image can be shown either in fit-to-screen or panning mode in 8, 15/16, and 32bpp.




SVGAlib

  • SVGAlib Tutorials - provides an easy way to create graphical applications and eliminates the rigmarole of the X Window System. If you have even the most rudimentary grasp of programming in C, then you can use SVGAlib.


GTK


Xvfb

  • Xvfb - or X virtual framebuffer is a display server implementing the X11 display server protocol. In contrast to other display servers Xvfb performs all graphical operations in memory without showing any screen output. From the point of view of the client, it acts exactly like any other X display server, serving requests and sending events and errors as appropriate. However, no output is shown. This virtual server does not require the computer it is running on to even have a screen or any input device. Only a network layer is necessary. Unlike a real display server, Xvfb does not support modern X11 extensions like compositing, Randr or GLX. Xdummy is a newer alternative which supports these extensions as well as providing the same functionality as Xvfb. Xvfb is primarily used for testing.


fbturbo

  • fbturbo - an Xorg driver for Allwinner and other ARM-based devices, derived from fbdev driver. With regard to 2D graphics, it provides a number of software optimizations on all platforms, while letting the SIMD (ARM NEON) accelerated code from the pixman library run at full speed without any unnecessary overhead. 2D hardware acceleration using G2D is supported on sunxi platforms. The recommended framebuffer color depths are 16 (RGB565) and 24 (XRGB8888), the other color depths may be supported too. Multi-head configurations are supported.


minifb


uvesafb


  • https://wiki.archlinux.org/index.php/AMD_Catalyst - AMD's Linux driver package catalyst was previously named fglrx (FireGL and Radeon X). Only the package name has changed, while the kernel module retains its original fglrx.ko filename. Therefore, any mention of fglrx below is specifically in reference to the kernel module, not the package.


fbtft


EGL

  • https://en.wikipedia.org/wiki/EGL_(API) - an interface between Khronos rendering APIs (such as OpenGL, OpenGL ES or OpenVG) and the underlying native platform windowing system. EGL handles graphics context management, surface/buffer binding, rendering synchronization, and enables "high-performance, accelerated, mixed-mode 2D and 3D rendering using other Khronos APIs." EGL is managed by the non-profit technology consortium Khronos Group.The acronym EGL is an initialism, which starting from EGL version 1.2 refers to Khronos Native Platform Graphics Interface. Prior to version 1.2, the name of the EGL specification was OpenGL ES Native Platform Graphics Interface. X.Org development documentation glossary defines EGL as "Embedded-System Graphics Library"


Display server

  • https://en.wikipedia.org/wiki/Display_server - or window server is a program whose primary task is to coordinate the input and output of its clients to and from the rest of the operating system, the hardware, and each other. The display server communicates with its clients over the display server protocol, a communications protocol, which can be network-transparent or simply network-capable. The display server is a key component in any graphical user interface, specifically the windowing system.

X Window System


Xwindows drives the underlying graphical interface of most if not all Unix/Linux computers providing a GUI. It was developed in 1984 at MIT. After around 35 years of development, tweaking and adding of new hardware and ideas, it is generally acknowledged to be a bit of a beast. It should be remembered that the common configuration at time of development was a single mini running X providing individual views to Xterminals in a timesharing system. Nowadays the norm is X providing a single screen on a desktop or laptop.

All of this means that there are many ways of achieving the same thing and many slightly different things that can meet the same purpose. In modern X versions sometimes you can get away with limited or no configuration. In the last few years the boast is that X is self configuring. Certainly the best practice rule of thumb is less configuration is better - that is only configure what is wrong.

Xorg

  • X.Org project provides an open source implementation of the X Window System. The development work is being done in conjunction with the freedesktop.org community. The X.Org Foundation is the educational non-profit corporation whose Board serves this effort, and whose Members lead this work.


X11: /usr/lib/X11 /etc/X11 /usr/include/X11 /usr/share/X11





  • A Testament to X11 Backwards Compatibility - I recently scored a Hewlett Packard 1670A Deep Memory Logic Analyzer and I finally had a chance to fire it up. This unit dates back to 1992 and is packed with all sorts of interesting options for connecting peripherals to it. One particular feature that caught my eye was the option to connect to an X Server.

History

Legacy X servers

  • https://en.wikipedia.org/wiki/XFree86 - was an implementation of the X Window System. For most of the 1990s and early 2000s, the project was the source of most innovation in X and was the de facto steward of X development. Until early 2004, it was almost universal on Linux and the BSDs. In February 2004, with version 4.4.0, The XFree86 Project adopted a license change that the Free Software Foundation considered GPL incompatible. Most open source operating systems using XFree86 found this unacceptable and moved to a fork from before the license change. The first fork was the abortive Xouvert, but X.Org Server soon became dominant. Most XFree86 developers also moved to X.Org.

DDX

  • DDX - For each type of graphics card there is a Device Dependent X (DDX) driver which does initialization, manages the display and performs 2D rendering. XFree86 4.0 introduced a new device driver interface called XAA which should allow XFree86 drivers to be backward compatible with future versions of the X server. Each 2D driver has a bit of code to bootstrap the 3D / DRI features.

DRI

  • https://en.wikipedia.org/wiki/Direct_Rendering_Manager - a subsystem of the Linux kernel responsible for interfacing with GPUs of modern video cards. DRM exposes an API that user space programs can use to send commands and data to the GPU, and perform operations such as configuring the mode setting of the display. DRM was first developed as the kernel space component of the X Server's Direct Rendering Infrastructure, but since then it has been used by other graphic stack alternatives such as Wayland. User space programs can use the DRM API to command the GPU to do hardware accelerated 3D rendering, video decoding as well as GPGPU computing.


echo 0xff | sudo tee /sys/module/drm/parameters/debug
  # and
echo 0x00 | sudo tee /sys/module/drm/parameters/debug


  • https://en.wikipedia.org/wiki/Direct_Rendering_Infrastructure - a framework for allowing direct access to graphics hardware under the X Window System in a safe, efficient way. The main use of DRI is to provide hardware acceleration for the Mesa implementation of OpenGL. DRI has also been adapted to provide OpenGL acceleration on a framebuffer console without a display server running. DRI implementation is scattered through the X Server and its associated client libraries, Mesa 3D and the Direct Rendering Manager kernel subsystem.

Startup

/etc/X11/xinit/xinitrc
if [ -d /etc/X11/xinit/xinitrc.d ]; then
       for f in /etc/X11/xinit/xinitrc.d/*; do
               [ -x "$f" ] && . "$f"
       done
       unset f
fi


Config

You can create a basic xorg.conf using the X executable itself. As root run:

Xorg :1 -configure

This will create the file /root/xorg.conf.new, which you can then copy to /etc/X11/xorg.conf:

cp /root/xorg.conf.new /etc/X11/xorg.conf


xrdb
xset



In case monitors don't report EDID information, modeline settings might required.

cvt 1280 1024 75


randr

  • http://en.wikipedia.org/wiki/RandR - a communications protocol written as an extension to the X11[2] protocol. XRandR provides the ability to resize, rotate and reflect the root window of a screen. RandR is also responsible for setting the screen refresh rate.


xrandr -q
  show possible and current screen resolutions
xdpyinfo | grep 'dimensions:'
  show just current screen resolution in px and mm


xrandrr='xrandr --output DVI-I-1 --mode 1280x1024 --pos 0x0 --panning 0x0+0+0 --output DVI-I-0 --mode 1280x1024 --pos 1280x0'

xrandrc='xrandr --output DVI-I-1 --same-as DVI-I-0'

xrandr --output DVI-I-1 --off

xrandr --output TV-0 --mode 1024x768 --pos 0x0 --panning 0x0+0+0 --output DVI-I-0 --mode 1280x1024 --pos 1024x0


  • ARandR is designed to provide a simple visual front end for XRandR. Relative monitor positions are shown graphically and can be changed in a drag-and-drop way.
  • autorandr - Auto-detect the connect display hardware and load the appropiate X11 setup using xrandr or disper


  • randrctl - Minimalistic JSON profile based screen manager for X. It allows to store current screen setup in a declarative configuration file (a profile) and apply stored settigns later with a simple command.

Multihead

faulty EDID;

  • DMX (Distributed Multihead X Project) - Typical X servers provide multi-head support for multiple displays attached to the same machine. When Xinerama is in use, these multiple displays are presented to the user as a single unified screen. Xdmx is proxy X server that provides multi-head support for multiple displays attached to different machines (each of which is running a typical X server). When Xinerama is used with Xdmx, the multiple displays on multiple machines are presented to the user as a single unified screen. A simple application for Xdmx would be to provide multi-head support using two desktop machines, each of which has a single display device attached to it.


Switching



  • Disper is an on-the-fly display switch utility. It is intended to be used just before giving a presentation with a laptop, when all one wants is that the beamer, which has just been connected, is able to show whatever you prepared. Disper gives you the option to either clone all detected displays, or extend the desktop to them. Resolutions are automatically detected. For cloning, the highest common resolution supported by all displays is chosen; for extending every display device gets its highest supported resolution. For special setups requiring more detailed control, one can still use the standard display configuration utilites.








Remote

X's network transparency was not designed as 'it will run xterm well'; originally it was to be something that should let you run almost everything remotely, providing a full environment. ... You cannot operate with X over the network in the same way that you do locally. Trying to do so is painful and involves many things that either don't work at all or perform so badly that you don't want to use them.

X Forwarding

Requires xorg-xauth and xorg-xhost packages on the remote machine.

Remote /etc/ssh/sshd_config:

AllowTcpForwarding yes
X11UseLocalhost yes

X11DisplayOffset 10

X11Forwarding yes

Remote /etc/ssh/ssh_config:

Compression yes

Local /etc/ssh/ssh_config (optional, flag is -X)

ForwardX11 yes
ssh -XC user@host
  # X forwarding, compression

xclock
  # remote xclock should appear locally

xhost +192.168.1.64
  # add address to x access control list
mcookie
  # generate magic cookie on remote, i.e., bc85bb773ae8897d9569ddbe69684411
xauth add node10/unix:3 . bc85bb773ae8897d9569ddbe69684411
  # add remote to local xauth list

xauth list
  # list X magic cookies
  • https://wiki.archlinux.org/index.php/Xhost - used to add and delete host names or user names to the list allowed to make connections to the X server. In the case of hosts, this provides a rudimentary form of privacy control and security. It is only sufficient for a workstation (single user) environment, although it does limit the worst abuses.

Xnest

  • Xnest is both an X client and an X server. Xnest is a client of the real server which manages windows and graphics requests on its behalf. Xnest is a server to its own clients. Xnest manages windows and graphics requests on their behalf. To these clients, Xnest appears to be a conventional server.
    • http://en.wikipedia.org/wiki/Xnest - a display server implementing the X11 display server protocol that shows its output in a window. In other words, Xnest opens a window that works like another screen in which the user can open windows, etc.

Xephyr

  • Xephyr is a kdrive based X Server which targets a window on a host X Server as its framebuffer. Unlike Xnest it supports modern X extensions (even if host server doesn't) such as Composite, Damage, randr etc (no GLX support now). It uses SHM Images and shadow framebuffer updates to provide good performance. It also has a visual debugging mode for observing screen updates.
Xephyr -br -ac -noreset -screen 800x600 :1 &

DISPLAY=:1 xterm
startx -- /usr/bin/Xephyr :1

Xpra

  • Xpra - X Persistent Remote Applications, is 'screen for X', and more: it allows you to run X programs, usually on a remote host and direct their display to your local machine. It also allows you to display existing desktop sessions remotely. Xpra is "rootless" or "seamless", and sessions can be accessed over SSH, or password protected and encrypted over plain TCP sockets. Xpra adapts to bandwidth constraints and is fully open-source. [10]

The main problem with ssh -X is all your apps close when your connection drops.

xpra shadow ssh:milk@silver.local:0 --ssh="/usr/bin/ssh p=231"
  # shadow the display on a remote machine


  • Xdummy was originally developed by Karl Runge as a ​script to allow a standard X11 server to be used by non-root users with the dummy video driver

x2x

x2vnc

  • x2vnc - A dual-screen hack. will let you use two screens on two different computers as if they were connected to the same computer. Even if one of the computers runs Windows 95/98/NT and the other one runs X-windows. The program will open a small (one pixel wide) window on the edge of your screen. Moving the pointer into this window will trigger the program to take over your mouse and send mouse movements and keystrokes though the RFB protocol to a VNC server running on another machine. When the pointer is moved back towards the opposite edge on the other screen, the mouse is then released again. The operation itself is almost identical to x2x, but most of the code was actually borrowed from the program vncviewer.

x11vnc

  • x11vnc allows one to view remotely and interact with real X displays (i.e. a display corresponding to a physical monitor, keyboard, and mouse) with any VNC viewer. In this way it plays the role for Unix/X11 that WinVNC plays for Windows.

xrdp

  • xrdp - An open source remote desktop protocol(rdp) server. Based on the work of FreeRDP and rdesktop, xrdp uses the remote desktop protocol to present a GUI to the user. The goal of this project is to provide a fully functional Linux terminal server, capable of accepting connections from rdesktop, freerdp, and Microsoft's own terminal server / remote desktop clients. Unlike Windows NT/2000/2003/2008/2012 server, xrdp will not display a Windows desktop but an X window desktop to the user. Xrdp uses Xvnc or X11rdp to manage the X session.

xmove

  • xmove - a computer program that allows the movement of X Window System applications between different displays and the persistence of X applications across X server restarts. It solves a problem in the design of X, where an X client (an X application) is tied to the X server (X display) it was started on for its lifetime. Also, if the X server is shut down, the client application is forced to stop running. xmove lets the client disconnect from its current X server, and connect to a new one, at any time. The transition is completely transparent to the client. xmove works by acting as a proxy between the client and server. It is a "pseudoserver" which stores enough server state so that clients can connect to a new server without being disrupted.

Guievict

  • guievict is a computer program which enables the GUI of any application for XFree86 implementation of X Window to be transparently migrated to or replicated on another display. Unlike some program providing similar functionalities, it requires neither prearranging steps such as re-linking the application program binary nor re-directing the application process's window system communication through a proxy like xmove does.

DXPC

to sort





Aliasing


Noise

  • The importance of good noise - There are many articles to read about noise functions in computer graphics, especially now that a lot of people recently got interested in ray tracing, but it took me a long time to fully understood why noise characteristics are so important and I didn’t find a good resource on the Internet explaining it, so I’ll give it a shot.

Glitch

  • r/unixporn: [i3lock - Glitched Screenlock with imagemagick and sox]

Synthesis

Evolutionary

  • Picbreeder - a collaborative art application based on an idea called evolutionary art, which is a technique that allows pictures to be bred almost like animals. For example, you can evolve a butterfly into a bat by selecting parents that look like bats.


Maching learning

  • Ganbreeder - a collaborative art tool for discovering images. Images are 'bred' by having children, mixing with other images and being shared via their URL. This is an experiment in using breeding + sharing as methods of exploring high complexity spaces. GAN's are simply the engine enabling this. Ganbreeder is very similar to, and named after, Picbreeder. It is also inspired by an earlier project of mine Facebook Graffiti which demonstrated the creative capacity of crowds.


Mir


Arcan

  • Arcan - Arcan is a powerful development framework for creating virtually anything between user interfaces for specialised embedded applications all the way to full-blown standalone desktop environments. Boot splash screen? no problem. SCADA HMI for your home? easy peasy. Xorg backend? got you covered. Wayland compositor? sure thing. At its heart lies a robust and portable multimedia engine, with a well-tested and well-documented interface, programmable using Lua. At every step of the way, the underlying development emphasises security, performance and debugability guided by a principle of least surprise in terms of API design. [14]


  • Durden - a desktop environment for the Arcan Display Server. It serves both as a reference showcase on how to take advantage of some of the features in Arcan, and as a very competent entry to the advanced-user side of the desktop environment spectrum. The basic premise is to absorb most, if not all, features from current desktop environments in a modular and configurable way - then let user selected profiles actually cherry- pick the configuration, visuals and tunning that reflects the desktop the user wants or is familiar with. Internally, it is based around a file-system like structure ("the menu") and everything else is references to paths within this structure. Development is discussed on IRC @ irc.freenode.net, #arcan - while issues are tracked at the github page for now.



Engine

See also Creative / live coding, 3D / CAD

Web gallery

  • OpenPhoto is an Open Source photo sharing platform which gives users complete ownership and portability of their photos. Users’ photos, tags and comments are seamlessly stored into personally owned cloud services owned by themselves. Whatever they want to do or wherever they want to go their photos are free to go with them.



  • Colorbox - A lightweight customizable lightbox plugin for jQuery







Services

Hosting

Design

Graphic designers

Graffiti

  • #000000book - An open database for Graffiti Markup Language (GML) files

Testing


Pixel art


Line art