ttfCreateGlTextEngineWithProperties function ttf

Pointer<TtfTextEngine> ttfCreateGlTextEngineWithProperties(
  1. int props
)

Create a text engine for drawing text with OpenGL, with extra properties.

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

The following properties are supported:

  • TTF_PROP_GL_TEXT_ENGINE_ATLAS_TEXTURE_SIZE_NUMBER: the size of the texture atlas in pixels, defaults to 1024.

\param props the properties to use. \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_CreateGLTextEngine \sa TTF_DestroyGLTextEngine \sa TTF_GetGLTextDrawData

extern SDL_DECLSPEC TTF_TextEngine * SDLCALL TTF_CreateGLTextEngineWithProperties(SDL_PropertiesID props)

Implementation

Pointer<TtfTextEngine> ttfCreateGlTextEngineWithProperties(int props) {
  final ttfCreateGlTextEngineWithPropertiesLookupFunction = _libTtf
      .lookupFunction<
        Pointer<TtfTextEngine> Function(Uint32 props),
        Pointer<TtfTextEngine> Function(int props)
      >('TTF_CreateGLTextEngineWithProperties');
  return ttfCreateGlTextEngineWithPropertiesLookupFunction(props);
}