Skip to content

Giacom/sdl2-opengl-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDL2 OpenGL Basic Template

Simple and useful (supposedly) cross-platform template for OpenGL. Uses SDL_GL_GetProcAddress() to create the OpenGL functions so that you do not need to link or include the OS specific opengl library.

// Use this!
#include <opengl.h>
// instead of
#include <gl.h>
// or
#include <SDL_opengl.h>

..and you don't need to link it in the Makefile..

LDLIBS = -lSDL2 # No gl here

..then make sure you use Init_OpenGL() after creating the OpenGL context to initialise the functions.

Credits

The opengl.h and opengl.cpp files are by nlguillemot who provided the source code and talks about it in this article. The opengl files are also derived from from Khronos' glcorearb.h.

About

Yet Another SDL OpenGL Template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published