Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- delete [] framebuffer;
- framebuffer = new char[display->xres * display->yres * 3];
- GzIntensity r, g, b, a;
- GzDepth z;
- for(int i = 0; i < display->xres; ++i)
- {
- for(int j = 0; j < display->yres; ++j)
- {
- GzGetDisplay(display, i, j, &r, &g, &b, &a, &z);
- int currentIndex = j * display->yres + i;
- framebuffer[currentIndex] = b;
- framebuffer[currentIndex + 1] = g;
- framebuffer[currentIndex + 2] = r;
- }
- }
- return GZ_SUCCESS;
Add Comment
Please, Sign In to add comment