[fpc-pascal] Loading PNG files as OpenGL textures

Michael Van Canneyt michael at freepascal.org
Mon Oct 12 08:34:47 CEST 2015



On Sun, 11 Oct 2015, Anthony Walter wrote:

> I tend to use OS core elements or well known open source libraries for a
> few reasons.
>
> 1) less code compiled and small programs
> 2) superior performance
> 3) more features

1. is not true for image code if you're using lazarus. The code will already be there.
2. May be true, depends on what it is.
3. May be true, depends on what it is.

But the downside is that you will need to write glue code for all libraries.
Which can be a real pain for cross-platform apps. Look at lazarus itself.
As a consequence your application may behave differently on each OS.
(XML is a sore point there, or Unicode)

So I would never recommend your route, unless there is no native pascal implementation.

For the specific case of image loading, only 2 holds true; 
so unless you really need great performance I see no reason to go this route.

Michael.



More information about the fpc-pascal mailing list