[fpc-pascal] Loading PNG files as OpenGL textures

Ryan Joseph ryan at thealchemistguild.com
Wed Oct 14 03:54:35 CEST 2015


> On Oct 12, 2015, at 5:52 PM, Graeme Geldenhuys <mailinglists at geldenhuys.co.uk> wrote:
> 
> http://members.upc.nl/h.speksnijder4/software/fpGUI/pngloader.html


Thanks for the links. BeRoPNG seems to load a PNG and the author states it’s fast and has no external dependancies. Fantastic.

According to Reimar’s code the raw image data is sufficient for glTexImage2D so I wonder if the data pointer returned from BeRoPNG would work also?

In my Apple CoreGraphics code I was drawing the image into a bitmap context and getting pixel data from the bitmap but that seems to be an extra step now.


Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list