SDL Wiki
(This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)

Draft

THIS PAGE IS A WORK IN PROGRESS ... Please make edits to this page to improve it!

SDL_RenderGetLogicalSize

Get device independent resolution for rendering.

Syntax

void SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);

Function Parameters

renderer

a rendering context

w

an int to be filled with the width

h

an int to be filled with the height

Remarks

When using the main rendering target (eg no target texture is set): this may return 0 for w and h if the SDL_Renderer has never had its logical size set by SDL_RenderSetLogicalSize(). Otherwise it returns the logical width and height.

When using a target texture: Never return 0 for w and h at first. Then it returns the logical width and height that are set.

Version

This function is available since SDL 3.0.0.

SDL_RenderSetLogicalSize

CategoryAPI, CategoryRender, CategoryDraft


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.