Hi,
Well, actually there are several methods of getting at the same end result, but whatever is the least demanding on performance will always have preference. In many simple 2D games this is not too much of a problem but as you advance in game development with much more coding and assets, then you are forced into things such as pre-compiling or Just In Time compiling.
I would say forget about online information because you need a lot of prerequisite knowledge and understanding. You need a good book on low level graphics programming specifically in the language that you are using. If you are using C++, then my opinion is that a book in this area would be essential and greatly help you. Not only do you need to implement this feature, but also you must understand how it relates to other aspects of your game code. I just don't feel that anything online short of a full graphics programming course would be worth the effort, so go with a comprehensive source.