GithubHelp home page GithubHelp logo

passdedd / raspidmx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andrewfrommelbourne/raspidmx

0.0 1.0 0.0 559 KB

Some examples using the DispmanX API on the Raspberry Pi

License: MIT License

Makefile 1.85% C 95.24% Objective-C 2.92%

raspidmx's Introduction

Dispmanx

There are a number of APIs available for the Raspberry Pi that can make use of the computers GPU. These include OpenMAX, Open GL ES(1 and 2) and OpenVG. The raspberrypi/firmware repository has short examples for these and other APIs. They can be found in /opt/vc/src/hello_pi/ on the Raspbian 'wheezy' image. Among these examples is a program called hello_dispmanx. It is a very small example of the Dispmanx windowing system. Apart from this:-

https://github.com/raspberrypi/firmware/tree/master/opt/vc/src/hello_pi/hello_dispmanx

example, there is very little documentation available for this API. There are snippets of information on the Raspberry Pi forum, but I have not found a single place with detailed information on DispmanX. Hopefully these programs can be used as a starting point for anyone wanting to make use of DispmanX.

The programs demonstrate layers with the following types: 4BPP (4 bit indexed), 8BPP (8 bit indexed), RGB565 (16 bit), RGB888 (24 bit), RGBA16 (16 bit with transparency) and RGBA32 (32 bit with transparency)

test_pattern

This test pattern should be familiar to anyone who has used the Raspberry Pi. It is the same four colour square displayed when the Raspberry Pi boots.

rgb_triangle

Displays a triangle in a layer with red, green and blue gradients starting at each corner respectively. Blends to grey in the center. Demonstrates changing size of source and destination rectangles.

life

Conway's game of life. Demonstrates double buffering.

worms

The program raspiworms uses a single 16 or 32 bit RGBA layer to display a number of coloured worms on the screen of the Raspberry Pi.

pngview

Load a png image file and display it as a Dispmanx layer.

spriteview

Loads a sprite (png) image file and displays it as an animation.

game

Demonstrates a seamless background image that can be scolled in any direction. As well as animated sprites.

mandelbrot

The famous (in the 1990s) Mandelbrot set.

radar_sweep

An animation of a 'radar sweep' using 16 bit (rgb) palette animation.

radar_sweep_alpha

An animation of a 'radar sweep' using 32 bit (rgba) palette animation.

offscreen

An example of using an offscreen display to resize an image.

common

Code that may be common to some of the demonstration programs is in this folder.

building

If you type make in the top level directory, the make file will build all the different programs in this repository. Each program has its own make file, so you can build them individually if you wish.

You will need to install libpng before you build the program. On Raspbian

sudo apt-get install libpng12-dev

raspidmx's People

Contributors

andrewfrommelbourne avatar crozone avatar thediveo avatar skarbat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.