Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Scott Cartier Newsgroups: scea.yaroze.programming.2d_graphics Subject: Background flicker Date: Mon, 18 Aug 1997 22:24:55 -0700 Organization: SCEA News Server Lines: 53 Message-ID: <33F92E27.19B4@concentric.net> Reply-To: dsyaroze@concentric.net NNTP-Posting-Host: ts011d21.cup-ca.concentric.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0C-GZone (Win95; I) I'm having trouble with my background. It flickers - like it's only being drawn every other frame. I'm using 640x480 and when I switch to low resolution it works fine. I'm wondering if there is something obvious I'm doing wrong. Here's a general outline of my program. Is there anything that jumps out as being incorrect (assuming I've initialized the cells and map data)? #define H_RES 640 #define V_RES 480 u_short backgnd_array[64 * 64]; // Max of 64 by 64 background GsCELL backgnd_cells[2]; // Only 2 cells for now GsMAP backgnd_map; GsBG backgnd; u_long backgnd_workarea[(((H_RES >> 4) + 1) * ((V_RES >> 4) + 1 + 1) * 6 + 4) * 2 + 2]; backgnd.attribute = 0; backgnd.x = 0; backgnd.y = 0; backgnd.w = H_RES; backgnd.h = V_RES; backgnd.scrollx = 0; backgnd.scrolly = 0; backgnd.r = backgnd.g = backgnd.b = 0x80; backgnd.map = map; backgnd.mx = backgnd.my = 0; backgnd.scalex = backgnd.scaley = ONE; backgnd.rotate = 0; GsInitFixBg16(&backgnd, backgnd_workarea); while (pad_state[PAD_SELECT] == 0) { // Main loop activeBuff = GsGetActiveBuff(); GsSetWorkBase((PACKET *)GpuPacketArea[activeBuff]); GsClearOt(0, 0, &WorldOT[activeBuff]); pad_read(); GsSortFixBg16(&backgnd, backgnd_workarea[activeBuff], WorldOT[activeBuff], OT_BACKGND); cnt = VSync(0); ResetGraph(1); GsSwapDispBuff(); GsSortClear(0, 0, 0, &WorldOT[activeBuff]); GsDrawOt(&WorldOT[activeBuff]); } Scott