nanogui: wrong colors with 16bpp -- SOLVED


Previous by date: 14 Dec 2004 16:32:20 +0000 Re: Linking nano-X into my application?, Manfred Gruber
Next by date: 14 Dec 2004 16:32:20 +0000 Re: [nanogui] Linking nano-X into my application?, Lars Törnkvist
Previous in thread:
Next in thread:

Subject: wrong colors with 16bpp -- SOLVED
From: Takács ####@####.####
Date: 14 Dec 2004 16:32:20 +0000
Message-Id: <200412141732.14714.takacs.aron@infracont.hu>

Hi,

the problem of the wrong colors has been solved. I have changed the following 
lines in device.h:

	Original:
	#define COLOR2PIXEL565(c)	\
	((((c) & 0xf8) << 8) | (((c) & 0xfc00) >> 5) | (((c) & 0xf80000) >> 19))*/
	Changed:
	#define COLOR2PIXEL565(c)	\
		((((c) & 0xf8) >> 3) | (((c) & 0xfc00) >> 5) | (((c) & 0xf80000) >> 8))

	Original:
	#define PIXEL565RED8(pixelval)          (((pixelval) >> 8) & 0xf8)
	#define PIXEL565GREEN8(pixelval)        (((pixelval) >> 3) & 0xfc)
	#define PIXEL565BLUE8(pixelval)         (((pixelval) << 3) & 0xf8)*/
	Changed:
	#define PIXEL565BLUE8(pixelval)          (((pixelval) >> 8) & 0xf8)
	#define PIXEL565GREEN8(pixelval)        (((pixelval) >> 3) & 0xfc)
	#define PIXEL565RED8(pixelval)         (((pixelval) << 3) & 0xf8)

With theese modifications the red and blue colors are changed, and the colors 
are correct.

Áron Takács

Previous by date: 14 Dec 2004 16:32:20 +0000 Re: Linking nano-X into my application?, Manfred Gruber
Next by date: 14 Dec 2004 16:32:20 +0000 Re: [nanogui] Linking nano-X into my application?, Lars Törnkvist
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.