sdlRenderPoint function

bool sdlRenderPoint(
  1. Pointer<SdlRenderer> renderer,
  2. double x,
  3. double y
)

Draw a point on the current rendering target at subpixel precision.

\param renderer the renderer which should draw a point. \param x the x coordinate of the point. \param y the y coordinate of the point. \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.1.3.

\sa SDL_RenderPoints

extern SDL_DECLSPEC bool SDLCALL SDL_RenderPoint(SDL_Renderer *renderer, float x, float y)

Implementation

bool sdlRenderPoint(Pointer<SdlRenderer> renderer, double x, double y) {
  final sdlRenderPointLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlRenderer> renderer, Float x, Float y),
      int Function(Pointer<SdlRenderer> renderer, double x,
          double y)>('SDL_RenderPoint');
  return sdlRenderPointLookupFunction(renderer, x, y) == 1;
}