Skip to content

Instantly share code, notes, and snippets.

@azmeuk
Last active December 16, 2015 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azmeuk/5501989 to your computer and use it in GitHub Desktop.
Save azmeuk/5501989 to your computer and use it in GitHub Desktop.
This code returns :EGL KOGLX OK
#include <EGL/egl.h>
#include <GL/glx.h>
#include <SDL/SDL.h>
int main(){
SDL_InitSubSystem(SDL_INIT_VIDEO);
SDL_SetVideoMode(200, 200, 0, SDL_OPENGL);
printf(eglGetCurrentContext() == EGL_NO_CONTEXT ? "EGL KO\n" : "EGL OK\n");
printf(glXGetCurrentContext() == NULL ? "GLX KO\n" : "GLX OK\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment