ttfCreateGlTextEngine function ttf

Pointer<TtfTextEngine> ttfCreateGlTextEngine()

Create a text engine for drawing text with OpenGL.

The caller is responsible for ensuring the correct OpenGL context is current when calling this function and when using the resulting text engine.

The GL text engine and all text created with it become invalid if the OpenGL context is destroyed. Destroy the engine before destroying the context.

\returns a TTF_TextEngine object or NULL on failure; call SDL_GetError() for more information.

\threadsafety This function should be called on the thread that created the OpenGL context.

\since This function is available since SDL_ttf 3.3.0.

\sa TTF_CreateGLTextEngineWithProperties \sa TTF_DestroyGLTextEngine \sa TTF_GetGLTextDrawData

extern SDL_DECLSPEC TTF_TextEngine * SDLCALL TTF_CreateGLTextEngine(void)

Implementation

Pointer<TtfTextEngine> ttfCreateGlTextEngine() {
  final ttfCreateGlTextEngineLookupFunction = _libTtf
      .lookupFunction<
        Pointer<TtfTextEngine> Function(),
        Pointer<TtfTextEngine> Function()
      >('TTF_CreateGLTextEngine');
  return ttfCreateGlTextEngineLookupFunction();
}