[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
GrReadArea return MWPF_PIXELVAL instead MWPF_RGB
From: ####@####.#### ####@####.#### Date: 7 Dec 2006 08:39:13 +0000 Message-Id: <J9WAP4$76E6470DE3A8605EB2BE20B9EACAFA22@libero.it> Hi, thanks a lot for your previous help. I have a problem on GrReadArea. I found that this function returns only the 16bit color instead of 32 rgb and i won't make a conversion in my application, i want to get RGB for GrReadArea. I see that is a file which name is FIXME in nanox-folder that write about this but i don't understand if the problem is just fixed. I'm using nanox 0.91 release. Any idea ? ------------------------------------------------------ Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://click.libero.it/infostrada07dic06 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: GrReadArea return MWPF_PIXELVAL instead MWPF_RGB
From: "Greg Haerr" ####@####.#### Date: 8 Dec 2006 02:24:21 +0000 Message-Id: <0a9701c71a6f$ef27e650$6401a8c0@winXP> > I have a problem on GrReadArea. I found that this function returns only the 16bit color instead of 32 rgb and i won't make a conversion in my application, i want to get RGB for GrReadArea. You'll need to modify nanox/client.c::GrReadArea(), and have it translate all the pixels from 5/6/5 to RGB before returning to the application. Although tedious, some examples near what you're going to need to do are: 1. check out engine/devdraw.c::GdArea(). The last while() loop basically pulls out R,G,B values from pixels using predefined macros and the current hw format. You'll then re-assemble them and write them sequentially in an output buffer. It would be nice to handle other than just your specific case, that's what the switch() statement is for. 2. The file i_video.c in nxdoom-src.gz contains code that rewrites pixels in an output buffer. I had to do this since Doom only operates in 8bpp mode, but I was running in 5/6/5 truecolor. Hope this helps. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |