54
54
// Windows Bitmap Header
55
55
head: array[0..53] of Byte = (
56
$42, $4D, // identifier ("BM")
57
0, 0, 0, 0, // file size
58
0, 0, 0, 0, // reserved
59
54, 0, 0, 0, // starting offset
60
40, 0, 0, 0, // header size
65
0, 0, 0, 0, // compression method (uncompressed)
66
0, 0, 0, 0, // image size
67
96, 0, 0, 0, // horizontal resolution
68
96, 0, 0, 0, // vertical resolution
69
0, 0, 0, 0, // number of colors (all)
70
0, 0, 0, 0 // number of important colors
56
$42, $4D, // identifier ("BM")
57
0, 0, 0, 0, // file size
58
0, 0, 0, 0, // reserved
59
54, 0, 0, 0, // starting offset
60
40, 0, 0, 0, // header size
65
0, 0, 0, 0, // compression method (uncompressed)
66
0, 0, 0, 0, // image size
67
96, 0, 0, 0, // horizontal resolution
68
96, 0, 0, 0, // vertical resolution
69
0, 0, 0, 0, // number of colors (all)
70
0, 0, 0, 0 // number of important colors
106
105
head[$24]:= (size shr 16) and $ff;
107
106
head[$25]:= (size shr 24) and $ff;
109
//remember that opengles operates on a single surface, so GL_FRONT *should* be implied
110
//glReadBuffer(GL_FRONT);
111
glReadPixels(0, 0, cScreenWidth, cScreenHeight, GL_BGR, GL_UNSIGNED_BYTE, p);
108
// read pixel from the front buffer
109
glReadPixels(0, 0, cScreenWidth, cScreenHeight, GL_BGRA, GL_UNSIGNED_BYTE, p);
114
112
Assign(f, filename);