Instantly share code, notes, and snippets.

@mk-fg /splash.c
Last active Aug 9, 2018

Embed
What would you like to do?
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <jpeglib.h>
#include "VG/openvg.h"
#include "VG/vgu.h"
#include "./src/fontinfo.h"
#include "./src/libshapes.h"
/*
% cd easy-vg && make
% gcc -Wall
-I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux
-I/opt/vc/include/interface/vcos/pthreads -I.
./splash.c -o ./splash
./build/libshapes.o ./build/oglinit.o
-L/opt/vc/lib -lEGL -lGLESv2 -lbcm_host -lpthread -ljpeg
% splash /path/to/image.jpg
*/
int main(int argc, char *argv[]) {
int w, h;
evgInit(&w, &h, -1);
evgBegin();
evgImage(0, 0, w, h, argv[1]);
evgEnd();
while (1) sleep(3600);
evgFinish();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment