API reference / Windows and drawing
SDL_RenderPoint
Function, SDL3
Colors one pixel with the current draw color.
Declaration
#include <SDL3/SDL.h>
bool SDL_RenderPoint(SDL_Renderer *renderer, float x, float y);Parameters
renderer | The renderer. |
x | The x position. |
y | The y position. |
Return value
True on success. On failure it returns false.
Example
for (float dy = -RADIUS; dy <= RADIUS; dy += 12.0f) {
for (float dx = -RADIUS; dx <= RADIUS; dx += 12.0f) {
SDL_RenderPoint(renderer, x + dx, y + dy);
}
}See this code run in Draw shapes. Download the full program (.zip)
In SDL2
Use SDL_RenderDrawPointF for float positions.