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
Here is a roughed in interface for SVGAlib without the SVGA. Rick.
Unit DrawPrimitives;
INTERFACE
PROCEDURE pixel (int X, int Y);
PROCEDURE line (int X1, int Y1, int X2, int Y2);
PROCEDURE line_pattern (unsigned int P_Bit_Mask);
PROCEDURE polygon (int P_Num_Pts, int *P_Pt_Array);
PROCEDURE set_loc_abs (int X, int Y); { Set current drawing location in absolute screen coordinates }
PROCEDURE set_loc_rel (int X, int Y); { Set new drawing location relative to current drawing location}
PROCEDURE line_to_abs (int X, int Y); {Draw line from current location to point (X,Y) make point (X,Y) new current location }
PROCEDURE line_to_rel (int X, int Y); { draw line from current location to point X pixels and Y pixels from the the current location. Make the location the new current location.}
PROCEDURE circle (int X_center, int Y_center, int Radius); { draw a circle with radius Radius, centered on point (X_Center,Y_Center) }
PROCEDURE ellipse (int X_center, int Y_center, int r1, int r2); {Draw an ellipse, with radii r1 and r2, centered on point (X_Center, Y_Center) }
PROCEDURE arc (int X_center, int Y_center, int Radius, int St_Angle, int End_Angle);
PROCEDURE set_fill_pattern(unsigned char P_FillPattern[8]);
PROCEDURE set_border_color (unsigned char P_Red, unsigned char P_Green, unsigned char P_Blue);
PROCEDURE get_border_color (unsigned char *P_Red, unsigned char *P_Green, unsigned char *P_Blue);
PROCEDURE get_pixel (int X, int Y, unsigned char *P_Red, unsigned char *P_Green, unsigned char *P_Blue);
PROCEDURE fill_rectangle (int X1, int Y1, int X2, int Y2);
PROCEDURE fill_ellipse (int X_center, int Y_center, int r1, int r2);
PROCEDURE floodfill (int X, int Y);
PROCEDURE polyfill (int P_Num_Pts, int *P_Pt_Array);