Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-12 Thread Michael Van Canneyt
On Mon, 12 Oct 2015, Anthony Walter wrote: Michael, I've written a whole lot of OpenGL demos (demoscene) using both C and Pascal. I can tell you there is a huge difference between the Delphi image decompression performance and the performance of the image libs ones provided by the OS (WIC

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-12 Thread Michael Van Canneyt
On Sun, 11 Oct 2015, Ryan Joseph wrote: On Oct 11, 2015, at 1:53 PM, Michael Van Canneyt wrote: You can use the fpimage and fpreadpng units. Check the packages/fcl-image sources. There is a small demo program that shows how to do it. I see you can load an image

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-12 Thread Michael Van Canneyt
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

Re: [fpc-pascal] STM32F407?

2015-10-12 Thread Michael Ring
STM32F407 and STM32F429 share the same reference Manual so they should be highly compatible. Which Board do you own, a Discovery board or MicroE Board? Michael Am 12.10.15 um 03:31 schrieb Andrew Haines: Hi, I've seen on the list that the STM32F429 has some support in fpc now! A couple of

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-12 Thread Anthony Walter
Michae ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-12 Thread Anthony Walter
I would abstract all platform specific code. I define a encapsulating set of interfaces for any platform specific stuff. Interface types also provide a nice layer of abstraction. In such a way I have at least IDocument, IBitmap, IAudio, and IVideo; where the last three type define methods for

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-12 Thread Anthony Walter
Michael, I've written a whole lot of OpenGL demos (demoscene) using both C and Pascal. I can tell you there is a huge difference between the Delphi image decompression performance and the performance of the image libs ones provided by the OS (WIC and Quartz especially). The OS imaging libs are

Re: [fpc-pascal] interface inheritance implementation

2015-10-12 Thread Graeme Geldenhuys
On 2015-10-11 20:29, David Emerson wrote: > // and finally the implementing class for i_multiplier_and_adder > t_multiplier_and_adder = class (tbase, i_multiplier_and_adder) I haven't tried this for a while, but vaguely remember the following. As far as I know Interface inheritance does not work

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-12 Thread Graeme Geldenhuys
On 2015-10-12 01:21, Ryan Joseph wrote: > But can I then access the pixel data so I can hand it to glTexImage2D and > make the texture? Yes, look at line 61. Simply use the Colors[] array property. The code I suggested was not meant as a complete implementation for you, but as an example of

Re: [fpc-pascal] STM32F407?

2015-10-12 Thread Andrew Haines
It is the discovery board. Andrew On October 12, 2015 2:49:37 AM EDT, Michael Ring wrote: >STM32F407 and STM32F429 share the same reference Manual so they should >be highly compatible. Which Board do you own, a Discovery board or >MicroE Board? > >Michael > >Am

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-12 Thread Graeme Geldenhuys
On 2015-10-12 08:26, Anthony Walter wrote: > The OS imaging libs are orders of magnitudes faster than TFPImage, > especially when it comes to loading 100s of textures during the start > of a demo or game. Indeed, FPImage is not very fast... This was also extensively proven and compared against

Re: [fpc-pascal] bug in Interface documentation?

2015-10-12 Thread Michael Van Canneyt
On Mon, 12 Oct 2015, Graeme Geldenhuys wrote: Hi, Speaking of Interfaces, there seems to be a bug (omission) in the Interface syntax diagram. http://www.freepascal.org/docs-html/ref/refse39.html The syntax diagram suggests that multiple interfaces can't be specified in the "heritage"

Re: [fpc-pascal] bug in Interface documentation?

2015-10-12 Thread Dmitry Boyarintsev
On Mon, Oct 12, 2015 at 11:51 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > The syntax diagram suggests that multiple interfaces can't be specified > in the "heritage" section. > Are you saying that interfaces allow multiple inheritance? I don't think they do. A class can

[fpc-pascal] bug in Interface documentation?

2015-10-12 Thread Graeme Geldenhuys
Hi, Speaking of Interfaces, there seems to be a bug (omission) in the Interface syntax diagram. http://www.freepascal.org/docs-html/ref/refse39.html The syntax diagram suggests that multiple interfaces can't be specified in the "heritage" section. I believe the diagram should look something

Re: [fpc-pascal] bug in Interface documentation?

2015-10-12 Thread Graeme Geldenhuys
On 2015-10-12 16:57, Dmitry Boyarintsev wrote: > Are you saying that interfaces allow multiple inheritance? I don't think > they do. Oh hell... LOL, it is Blue Monday for me! :-[ My apologies, you are indeed correct. Regards, - Graeme - ___

Re: [fpc-pascal] interface inheritance implementation

2015-10-12 Thread Graeme Geldenhuys
On 2015-10-12 16:18, Sven Barth wrote: > Would be nice if you'd find it. I found it, but the point is moot (just like my recent post about Interface documentation bug). It's Blue Monday for me today. :-[

Re: [fpc-pascal] STM32F407?

2015-10-12 Thread Michael Ring
I checked the F429 unit, it is a little incomplete. I will talk to Jeppe Johansen that we provide a more complete version and perhaps also a version directly for the f407 Michael Am 12.10.15 um 13:13 schrieb Andrew Haines: It is the discovery board. Andrew On October 12, 2015 2:49:37 AM

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-12 Thread Reimar Grabowski
On Sun, 11 Oct 2015 16:36:56 +0700 Ryan Joseph wrote: > is there any more complete examples I could look at? http://sourceforge.net/p/asmoday/code/HEAD/tree/trunk/asmtypes.pas#l203 Not an example but a straightforward texture class implementation based on

Re: [fpc-pascal] interface inheritance implementation

2015-10-12 Thread Graeme Geldenhuys
On 2015-10-12 14:17, Graeme Geldenhuys wrote: > I the last week or two read a > conversation (can't remember if it was Laz Forums or Google+) where a > Delphi developer did this, but couldn't get that same code to work under > FPC. Scratch that I'll rather try and find the exact article/blog

Re: [fpc-pascal] interface inheritance implementation

2015-10-12 Thread Sven Barth
Am 11.10.2015 21:30 schrieb "David Emerson" : > Do I have to implement all of the individual i_adder methods for t_multiplier_and_adder? Is there no shortcut? AFAIK you can only delegate interfaces that are part of the class' declaration, in your case i_multiplier_and_adder,

Re: [fpc-pascal] interface inheritance implementation

2015-10-12 Thread Graeme Geldenhuys
On 2015-10-12 13:31, Sven Barth wrote: > AFAIK you can only delegate interfaces that are part of the class' > declaration, in your case i_multiplier_and_adder, but not inherited > interfaces, in your case i_adder. That is exactly what I meant when I said "interface inheritance is not fully

Re: [fpc-pascal] interface inheritance implementation

2015-10-12 Thread Graeme Geldenhuys
On 2015-10-11 20:29, David Emerson wrote: > So I would like to use an interface that inherits from another > interface, and ... well rather than describe what I'm trying to do, I > think code speaks best. Attached is a working example, tested under Delphi 7 and FPC 2.6.4. It is slightly

Re: [fpc-pascal] interface inheritance implementation

2015-10-12 Thread Sven Barth
Am 12.10.2015 12:13 schrieb "Graeme Geldenhuys" < mailingli...@geldenhuys.co.uk>: > In FPC you can't inherit one Interface from another. Of course FPC supports interface inheritance. Regards, Sven ___ fpc-pascal maillist -

Re: [fpc-pascal] interface inheritance implementation

2015-10-12 Thread Sven Barth
Am 12.10.2015 15:44 schrieb "Graeme Geldenhuys" < mailingli...@geldenhuys.co.uk>: > > On 2015-10-12 14:17, Graeme Geldenhuys wrote: > > I the last week or two read a > > conversation (can't remember if it was Laz Forums or Google+) where a > > Delphi developer did this, but couldn't get that same

Re: [fpc-pascal] interface inheritance implementation

2015-10-12 Thread wkitty42
On 10/12/2015 12:06 PM, Graeme Geldenhuys wrote: On 2015-10-12 16:18, Sven Barth wrote: Would be nice if you'd find it. I found it, but the point is moot (just like my recent post about Interface documentation bug). It's Blue Monday for me today. :-[ [...] I got a bit confused regarding the