Rick Engebretson wrote:
Frank Heckenbach wrote:
Rick Engebretson wrote:
In playing with framebuffer drawing efforts, something interesting came up.
In brief (so as not to bore everyone) the same draw program and unit works differently between fpc and gpc. But neither work.
I suspect it is in the rewrite and/or blockwrite functions. I'm using 16bit pixels so I'm dealing with converting 16 bit to byte writes.
Anyway, for a simple red horizontal line on a solid background. Fpc gives me two red lines on a clean blue background. While gpc gives me a single red line on a spotted blue background.
Also, gpc gave me the proper error code for using blockwrite on a typed file.
Conclusion; a bad program performs differently on fpc and gpc.
Which is not surprising in general. :-)
Without seeing your code, I doubt anyone here can tell you much more.
What I can say is a problem I had when I played with fb was the palette. The fb console doesn't set up a palette as usual (in particular in 32 bit pixel mode). So you better set your palette first in any case. You might want to look at my fgv.pas for an example.
Frank
I now think the difference is due to FPC defines "word" integers as 16 bit. GPC defines "word" integers as 32 bit. I declared the colors as "word" integers in the code. When I wrote the GPC "word" integers to the framebuffer, I got 16 bits of blank "spots". So it does work. Sorry, again my mistake. Looking through older manuals, there seems to be no common integer types between FPC and GPC ??