void Rastr int GLint height width size glRasterPos2f height SCREEN_HEI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
void Rastr() {
int i,j;
GLint height, width, size = 0;
glRasterPos2f(0, 0);
height = SCREEN_HEIGHT;
width = SCREEN_WIDTH;
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
int x, y;
for (y = 0; y < height; y++) {
RGBA* rowStart = image + (width) * y;
RGBA* row = rowStart;
for (x = 0; x < width; x++) {
row[x].r = 0;
row[x].g = 0;
row[x].b = 0;
row[x].a = 1;
}
}
pg->rastrDraw();
glDrawPixels(width, height, GL_RGBA, GL_UNSIGNED_BYTE, image);
}