I have a SDL_rect named mapRect
containing my map consisting of tiles, and some of that tiles have textures loader. This rectangle is much times higher and wider than my window size.
Am I able to render just a part of it? Or shall I do it other way, for instance somehow cast this SDL_Rect into SDL_texture and then render it using SDL_RenderCopyEx()
function (like it was done in the Lazy Foo's SDL scrolling tutorial)?
PS. I also found SDL_RenderDrawRect()
function, but I'm not pretty sure how it exacly works. Can I use it to solve my problem?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…