From: James Cassidy (jcassidy@nova.galaxyvista.com)
Date: Fri 17 Aug 2001 - 06:32:23 IDT
Has anyone had this problem?
I'm observing palette value corruption. I've created a simple program that
demonstrates
the problem I'm having. It writes values to the palette, then reads them
back, comparing
the read and write values. I'm using 1.9.9. with a Radon card (r128
driver) on a PIII running
Linux 2.2.19
Here's a sample of the output:
0: [ 0: 0: 0] [ 0: 0: 0] attemps=0
1: [ 1: 1: 1] [ 0: 1: 1] attemps=100
2: [ 2: 2: 2] [ 0: 2: 2] attemps=100
3: [ 3: 3: 3] [170: 3: 3] attemps=100
4: [ 4: 4: 4] [170: 4: 4] attemps=100
5: [ 5: 5: 5] [170: 5: 5] attemps=100
6: [ 6: 6: 6] [170: 6: 6] attemps=100
7: [ 7: 7: 7] [ 85: 7: 7] attemps=100
8: [ 8: 8: 8] [ 85: 8: 8] attemps=100
Here's the program that demonstrates the problem:
#include <stdio.h>
#include <vga.h>
#include <vgagl.h>
main()
{
int i, r, g, b, rT, gT, bT, j;
FILE *filePtr;
filePtr = fopen( "ptest.log", "w" );
if( vga_init() != 0 ) {
fprintf( filePtr, "vga_init failure\n" );
exit( 1 );
}
if( vga_setmode( G1024x768x256 ) ) {
fprintf( filePtr, "setMode failed\n" );
exit( 1 );
}
// set context to physical screen
if( gl_setcontextvga( G1024x768x256 ) != 0 ) {
fprintf( filePtr, "gl_setcontextvga failure: mode not supported\n" );
}
// set extended feature 8 bit lut
vga_ext_set( VGA_EXT_SET, VGA_CLUT8 );
for( i = 0 ; i < 256 ; i++ ) {
r = i;
g = i;
b = i;
for( j = 0 ; j < 100 ; j++ ) {
gl_setpalettecolor( i, r, g, b );
gl_getpalettecolor( i, &rT, &gT, &bT );
if( r == rT && g == gT && b == bT )
break;
}
fprintf( filePtr, "%d: [%3d:%3d:%3d] [%3d:%3d:%3d] attemps=%d\n",
i, r, g, b, rT, gT, bT, j );
}
vga_setmode( TEXT );
}
------------------------------------------------------------------
Unsubscribe: To: listbot@svgalib.org
Body: unsubscribe linux-svgalib
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:24 IST