[fpc-pascal] Loading PNG files as OpenGL textures
ryan at thealchemistguild.com
Thu Oct 15 10:30:41 CEST 2015
> On Oct 14, 2015, at 1:49 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
> TMyImage = Class(TFPCompactImgRGBA8Bit)
> property Data : PFPCompactImgRGBA8BitValue read FData;
> Should do it. Or if you don't need Alpha:
> TMyImage = Class(TFPCompactImgRGB8Bit)
> property Data : PFPCompactImgRGB8BitValue read FData;
> You could throw in a property to get a direct pointer
TFPCompactImgRGBA8Bit descends from TFPMemoryImage I assume? I need to draw text as textures also and I found an example at http://wiki.freepascal.org/fcl-image#Drawing_text which uses TFPMemoryImage.
Thanks for the example, I’ll give this a try.
More information about the fpc-pascal