3.6 Using the SDL renderer

For advanced users RebelSDL allows you to call SDL renderer functions directly for the ultimate flexibility. Take note, though, that if you do this then you'll be operating at a very low level and some Hollywood features like the autoscaling engine won't work any more because all your drawing calls are routed directly through SDL without Hollywood having a chance to intervene. This has very little overhead but comes at the expense of certain Hollywood features not working any longer, like the autoscaling engine.

If you do make SDL renderer calls directly, you should also not mix them with Hollywood drawing calls. You should either draw entirely with Hollywood functions or with SDL renderer functions. Mixing both is possible but might yield some unexpected results because Hollywood drawing functions will of course change state information of the SDL renderer themselves, i.e. if you call sdl.SetRenderDrawColor() to set the drawing color to red and then use Hollywood's Box() command to draw a blue box, then the renderer color will suddenly be blue because the call to Box() has changed the renderer color to blue. These are side effects you have to be able to deal with when mixing SDL renderer calls and Hollywood drawing calls.


Show TOC