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);
}