Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
253 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...