Friday, 15 February 2013

c++ - How to render the original size of a texture easily? -



c++ - How to render the original size of a texture easily? -

what mean is, have create sdl_rect every texture want render, or sdl_texture have sdl_rect fellow member can pass to

int sdl_rendercopy(sdl_renderer* renderer, sdl_texture* texture, const sdl_rect* srcrect, const sdl_rect* dstrect)

as dstrect.

i looked documentation what's within sdl_texture, can't find any.

to width , height of texture can utilize sdl_querytexture , create sdl_rect using that.

c++ sdl-2

No comments:

Post a Comment