Search code examples
c++scrollableallegro5

How to limit drawing area in Allegro 5?


I want to make a scrollable window in Allegro 5. The problem is, in order to make everything work, I'd need to limit drawing area, so the parts of window that, due to scrolling, are above this window are not visible. Is there any way to do this? I am asking about something like love.graphics.setScissor.


Solution

  • Got the solution. The functions I was looking for are al_set_clipping_rectangle() and al_get_clipping_rectangle().