Hi Gernot,
Getpixel.... i read the documentation, and obviously im very familliar with it (hence 3d font creator and image2object programs)
The thing is, it reads 4 times larger a dot than actually exists.
For instance if i put one single white dot and use this command:
ok=GETPIXEL(x,y)
IF ok<>RGB(0,0,0)
If this sees the single dot, it is reading into my dim 4 dots, one above the original one to the right and one below.
like this pattern:
0
00
0
I need to know exactly how it works internally, or maybe you can release the source in form of an inline?
Could this be why it is so slow: it is reading 4 times more info than actually exists?
Is there a way to tune the appeture of the cemera "eye"?
As far as I can tell, the value read in is exactly the colour it should be on a PC - A 32-bit graphics mode is actually 4 bytes (although the top 8 is always ignored) and you get a 24-bit colour value.
So, an RGB(255,0,255) returns 16711935 which is $FF00FF
I can't see it reading in data 4 times this value (a 128-bit colour value), so I suspect it may be worth looking at your code - any chance that you'll be able to post it ?
Quote
I can't see it reading in data 4 times this value (a 128-bit colour value), so I suspect it may be worth looking at your code - any chance that you'll be able to post it ?
Its not reading 4 times the value..
..it is reading the color from the pixel next to it, as if "Bleeding" over....internally in the GPU.
And thats why i want to know: Is there a way to adjust this bleeding effect?
Can you share the getpixel code as an inline, so i might be able to do some more specific tasks with it?
Original code that reads 3 extra pixels around a white one:
ok=GETPIXEL(x,y)
IF ok<>RGB(0,0,0)
Workaround:
ok=GETPIXEL(x,y)
IF ok<>RGB(128,128,128)
Its not my code that does this....its the fact that the agp memory doesnt report the correct color 10-20% of the time....so you need to increase this margin of error...thats why i jumped it up to 0x7f 0x7f 0x7f
It perfectly detects black or white, without fail this way.
Cant say its something I get here - it sounds like your graphics screen is in 16-bit mode, for some reason - if so, it would explain why you get the pixel next to it - reading a 32-bit colour on a 16-bit screen...
Its the nature of GETPIXEL, i guess....
void glReadPixels( GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
GLvoid *pixels )
Gernot, is this the guts of GETPIXEL() command?
Do the height and width = 1 ?
Or is it possibly my video settings causing this?
8xS antialiasing is set, and negative LOD bias - ALLOW is set.
Yes, that's what I'm using.
I would start with turning off AA
Aye, thats what must be "bleeding over"...ill test it as i need more sophistication in my data files.
@Toad: its not my code :good:
Quite possible its anti-aliasing mucking around :)