[Lazarus] Graphical differences between Mac OS X on Intel and PowerPC...

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Jun 7 13:10:23 CEST 2009


On Sun, 07 Jun 2009 06:50:30 -0400
<dominique at savagesoftware.com.au> wrote:

> I've narrowed down the surface creation error to the following
> block...
> 
>     {$IFDEF CPUPOWERPC}
>     tempSurface := SDL_CreateRGBSurfaceFrom( aWordArray, aWidth,
> aHeight, 32, aWidth * 4, $FF000000, $00FF0000, $0000FF00, $000000FF );
>     {$ENDIF}
>     {$IFDEF CPUi386}
>     tempSurface := SDL_CreateRGBSurfaceFrom( aWordArray, aWidth,
> aHeight, 32, aWidth * 4, $000000FF, $0000FF00, $00FF0000, $FF000000 );
>     {$ENDIF}
>     {$IFDEF CPUARM}
>     tempSurface := SDL_CreateRGBSurfaceFrom( aWordArray, aWidth,
> aHeight, 32, aWidth * 4, $000000FF, $0000FF00, $00FF0000, $FF000000 );
>     {$ENDIF}
> 
> The only one that works is the line in CPUi386. The CPUPOWERPC
> displays with the pink glitch I mentioned earlier and I'm not really
> concerned about CPUARM just yet.

Please tell how tempSurface is passed to the LCL.

You can see what image format the LCL uses with the following code:

procedure TMainForm.FormCreate(Sender: TObject);
var
  bmp: TBitmap;
  IntfImg: TLazIntfImage;
begin
  bmp:=TBitmap.Create;
  IntfImg:=bmp.CreateIntfImage;
  writeln(IntfImg.DataDescription.AsString);
  IntfImg.Free;
  bmp.Free;
end;

Keep in mind the the format depends on the source. A screen shot may
have another format than a memory TBitmap.


Mattias


> 
> Dominique. 
> 
> On Thu, 04 Jun 2009 11:28:12 +0200, Marc Weustink
> <marc.weustink at cuperus.nl>
> wrote:
> > dominique at savagesoftware.com.au wrote:
> >> Hi Dimtry,
> >>  I'll try and do so this evening. But the thing is that if I
> >> create the GM
> >> project on PowerPC and run it on Intel it looks fine. 
> >> So my question is once the bitmap is loaded from HD or a stream,
> >> shouldn't
> >> it be identical once it is in memory regardless of if it is on
> >> Intel or PowerPC. Shouldn't the RTL or LCL handle those
> >> differences?
> > 
> > The LCL should handle this, but as ong as we don't know what you
> > are doing, we cannot tell what is wrong.
> > 
> > Marc
> > 
> > 
> > _______________________________________________
> > Lazarus mailing list
> > Lazarus at lists.lazarus.freepascal.org
> > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
> 
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




More information about the Lazarus mailing list