project for a (works on my devices) demo
This commit is contained in:
20
SOURCES/main.c
Executable file
20
SOURCES/main.c
Executable file
@@ -0,0 +1,20 @@
|
||||
#include "graphics/library/application_context.h"
|
||||
|
||||
#include <GLES2/gl2.h>
|
||||
/* issues the onscreen display of the gl rendered buffer by swapping it with the current one */
|
||||
void swapBuffers( application_context *app){
|
||||
wl_display_dispatch_pending(app->w_context->display);
|
||||
eglSwapBuffers( app->e_context->display, app->win->egl_surface);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
application_context *app;
|
||||
|
||||
app = application_context_new( "Hello World");
|
||||
|
||||
while(1){
|
||||
glClearColor(1, 0, 0, 0);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
swapBuffers( app);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user