Advertisement
Guest User

Untitled

a guest
Feb 27th, 2015
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. SDL_Window* window = SDL_CreateWindow(title, x, y, w, h, SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL);
  2. SDL_Surface* s = SDL_GetWindowSurface(window);
  3. SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, flags);
  4. SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);
  5.  
  6. SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION, 3 );
  7. SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION, 2 );
  8. //SDL_GL_SetAttribute( SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE );
  9. SDL_Window* window = SDL_CreateWindow( ... );
  10. SDL_GLContext ctx = SDL_GL_CreateContext( window );
  11. SDL_GL_MakeCurrent( window, ctx );
  12. glewExperimental = true;
  13. glewInit();
  14. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement