Newer
Older
Import / code / Book / Common / test.cpp

enum ColourFormat {
	RGB_555 = 0,
	RGB_565,
	RGB_888 ,
	ARGB_8888
};

class Colour {
	public:
		unsigned char red;
};

static const int screenWidth = 1024;

template<ColourFormat format>
void writePixel(int x, int y, Colour col)
{
	int index = (y * screenWidth) + x;
	//framebufferBaseAddress[index] = val;
}