Path: chuka.playstation.co.uk!news From: "Rad" Newsgroups: scee.yaroze.programming.2d_graphics Subject: Filling the screen with boxes Date: Sat, 26 Dec 1998 14:44:30 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 45 Message-ID: <762se1$2296@chuka.playstation.co.uk> NNTP-Posting-Host: ismuk.demon.co.uk X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 I'm having problems trying to fill the screen (320x240) with boxes (GsBOXF). Now if I use boxes of width and height 1 then I need 76800 boxes to fill the screen - which I have tried and it hasn't worked probably because it requires way to much memory. So I changed the box sizes to 4x4 meaning that I would only need 4800 to fill the screen but this only works if I start drawing the boxes at line 12? Here is some example code: // declaration GsBOXF box[80][60]; // initialisation for (y = 0; y < 60; y++) for (x = 0; x < 80; x++) { box[x][y].w = box[x][y].h = 4; // size of 4x4 box[x][y].x = x * 4; box[x][y].y = y * 4; box[x][y].r = box[x][y].g = box[x][y].b = 255; // colour = white } // drawing for (y = 0; y < 240; y++) // this needs to be "for (y = 12; < 240; y++) " to work for (x = 0; x < 320; x++) GsSortBoxFill(&box[x][y], &WorldOT[acvtiveBuffer],0); I've made sure my gpu packet area is big enough and even if I change the box sizes to 8x8 (requiring even less boxes) I still can't fill the whole screen. All I get is a flashing screen with 3/4 of the right side filled and some corrupted boxes at the bottom. If anyone can help or has any ideas then I would really appreciate it. Thanks, Rad. rad@cyberdude.com http://www.netyaroze-europe.com/~radpsx