3 ms·
You can do something similar now using SDL. In fact, unless you are blitting bitmaps or using additional libraries, it is the only way to get stuff on screen. S
by angrycoder 15y ago
You can do something similar now using SDL. In fact, unless you are blitting bitmaps or using additional libraries, it is the only way to get stuff on screen. SDL gives you a pointer that corresponds to the video memory and you stick colors into it.
Here is a tutorial for using SDL for 'old school' graphics programming:
http://sol.gfxile.net/gp/ http://sol.gfxile.net/gp/
Of course this would require the student to install SDL and write a makefile to link it all together. I feel that is something worth covering though, since most books just do a bunch of hand waving when it comes to linking external libraries.
- JoshTriplett 15y agoWhen I said "quite a bit more setup", I had SDL in mind. :) Yes, you can get a raw pointer to a graphics buffer via SDL, but in addition to the extra setup to get a window, you have to make extra calls (such as SDL_Flip or SDL_UpdateRect) to make your changes visible.