#include #include #include #include #include int main(int argc, char* argv[]) { SDL_Init(SDL_INIT_VIDEO); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); SDL_Window* win = SDL_CreateWindow( "GLES2 test", 640, 480, SDL_WINDOW_OPENGL ); SDL_GLContext ctx = SDL_GL_CreateContext(win); SDL_GL_MakeCurrent(win, ctx); SDL_Log("GL_VERSION: %s", glGetString(GL_VERSION)); return 0; }