Path: chuka.playstation.co.uk!news From: Alex Herbert Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: How do I manipulate Pixels? Date: Fri, 07 Aug 1998 18:53:08 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 29 Message-ID: <35CB3F04.B62C7F34@ndirect.co.uk> References: <6qfcml$ldg12@chuka.playstation.co.uk> Reply-To: aherbert@ndirect.co.uk NNTP-Posting-Host: dialin2-43.ndirect.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (Win95; I) Chris Searle wrote: > How can I manipulate individual pixels on the screen without using any of > the lib structures. Currently I'm using lots of GsLINE's and setting the > same start and finish points, but its too slow. > You have to use the Libs. Using a 1x1 pixel sprite it much quicker than the above method. > As and example how would I rereate TV static, ie randomly setting each pixel > as black or white ( rand()%2 , on or off). Please, please give me source its > all I understand! Setting individual pixels is not the best way to achieve this sort of effect. It's very inefficient as it would require a seperate draw command being issued to the GPU for each pixel. It would be better to have a batch of pre-drawn tiles (say 16x16 pixels) of static, and build the screen randomly from these. I'd suggest you start by looking at some of the exceptionally good tutorials provided by the other members. Get to grips with sprites first, and then all will start to become clear. Sorry if that wasn't as much help as you wanted, but I'm sure other members will also provide some assistance. Herbs