Object Oriented Programming simplifies the task of programming real world problems by breaking the problem into thinkable chunks called objects, and letting each object handle its sphere of the problem in concert with other objects. While C is not designed as a OOP language, a simple protocol can be used to program class like objects. This book demonstrates how C can be organized in a OOP manner.
The demonstration is not just a recipe however. In explaining the protocol, structs, pointers and handling memory are explained in a way that, I hope, removes the scary monsters that seem to lurk in the shadow lands of C. Both the 64 and the 32 bit MINGW C environment configurations are explained and implemented. Rather than use this or that IDE which not everyone has or wants all the compilation is carried out in Window's .bat files (Linux and Mac users will need to convert the Window .bat to appropriate formats). This has the added advantage of lifting the hood, so to speak, on some of the operations of C as the role of paths, linkers and the compiler are exposed.
SDL2, SDL2_Image, SDL2_TTF and OpenGl are included for three reasons. First, they are external libraries and their inclusion into the MINGW environment and configuration in the .bat file gives an insight into the relationships between C and external libraries. Second, this book provides another way of setting up SDL2 OpenGL in a Windows C environment. Third, there is a moderately complex program typed into the last chapter that uses these libraries to display a texture on a screen aligned quad, which texture is generated on the fly by using SDL2_TTF to write text on an SDL2 image. I apologize for not putting the code on Git. Note that the title of the book is "C Easily with SDL2", it is not "C Easily and SDL2". Do not expect insights into SDL2 or OpenGL other than their bare configuration on the Windows platform and what you can glean from the code. If you are looking for an explanation of OpenGl please see "GLES20 on Android: A Game Engine". Although written for Android the material on OpenGl is applicable for any platform.
The second edition contains illustrations that depict the operation of pointers.
C Easily with SDL2
📄 Viewing lite version
Full site ›
Price not listed
🛒 Buy New on Amazon 🇺🇸
Book Details
Author(s)Stephen Jones
PublisherStephen Jones
ISBN / ASINB00JVAO3OO
ISBN-13978B00JVAO3O9
Sales Rank678,117
MarketplaceUnited States 🇺🇸