GLContext.this - multiple declarations

Function GLContext.this

Constructs a dsdl2.GLContext from a vanilla SDL_GLContext from bindbc-sdl

this (
  void* sdlGLContext,
  bool isOwner = true,
  void* userRef = null
);

Parameters

NameDescription
sdlGLContext the SDL_GLContext to manage
isOwner whether the instance owns the given SDL_GLContext and should destroy it on its own
userRef optional pointer to maintain reference link, avoiding GC cleanup

Function GLContext.this

Creates an OpenGL context to use by SDL, which wraps SDL_GL_CreateContext

this (
  Window window
) @trusted;

Parameters

NameDescription
window the default OpenGL dsdl2.Window to be set current as the rendering target for the context

Throws

dsdl2.SDLException if OpenGL context creation failed