Newer
Older
Import / research / signals-slots / src / gui / jpeg / main.cpp
@John Ryland John Ryland on 22 Dec 2020 582 bytes import NUC files
#include <application.h>
#include <screen.h>
#include <loadjpeg.h>
#include <unistd.h>


#include <OpenGL/OpenGL.h>
#include <OpenGL/gl.h>
int main(int argc, char *argv[])
{
    Application app(argc, argv);
    Image img = loadJpegFile(argv[1]);
    for ( int i = 0; i < 100; i++ ) {
        blit(getScreen()->frameBuffer(), i, i, &img);
        getScreen()->flush();
//        usleep(10000);
    }
    getScreen()->flush();

//glFlush(); // Appears to cause delay, but might just be waiting for vertical retrace

    //delete getScreen();
    //return 0;
    return app.exec();
}