Example #1
0
File: gl.go Project: henkman/Go2D
func GL_DeleteContext(_context *GLContext) {
	C.SDL_GL_DeleteContext(C.SDL_GLContext(_context))
}
Example #2
0
func (ctx GLContext) c() C.SDL_GLContext {
	return C.SDL_GLContext(ctx)
}
Example #3
0
// GL_MakeCurrent (https://wiki.libsdl.org/SDL_GL_MakeCurrent)
func GL_MakeCurrent(window *Window, glcontext GLContext) error {
	if C.SDL_GL_MakeCurrent(window.cptr(), C.SDL_GLContext(glcontext)) != 0 {
		return GetError()
	}
	return nil
}
Example #4
0
// GL_DeleteContext (https://wiki.libsdl.org/SDL_GL_DeleteContext)
func GL_DeleteContext(context GLContext) {
	C.SDL_GL_DeleteContext(C.SDL_GLContext(context))
}
Example #5
0
func GL_MakeCurrent(window *Window, glcontext GLContext) int {
	return int(C.SDL_GL_MakeCurrent(window.cptr(), C.SDL_GLContext(glcontext)))
}