Posted: 11th Jun 2007 2:25
This question is directed to anyone who has ever created a graphical plugin for DBPro.

I created a simple 2D graphics plugin, using FreeBASIC. Which is based on the GNU C compiler. The plugin works as it should, except it is extremely slow. I retested the same DLL within FreeBASIC, (without any changes) and it ran lightning fast. Has anyone ever encountered a similar problem? I know I haven't posted any code, but I would just like to know if there are any simple pointers for DBPro graphical plugins.
Posted: 11th Jun 2007 2:27
Personally, All plugins I write using PureBASIC make me have a 6%-25% performances gain.
Posted: 11th Jun 2007 2:33
Yes, exactly. That is what I expected. Especially since it was written using inline assembly. However, I'm not exagerating. It is executing at 6 FPS in DBPro, but at 120+ FPS in FreeBASIC. It's the exact same DLL.
Posted: 11th Jun 2007 7:20
Perhaps posting your DBP source code would reveal something. I'm guessing that this isn't really a DBP plugin, but a regular DLL.
Posted: 11th Jun 2007 11:15
Do you plugin use the native DarkBASIC Professional gfx output or does it render its own window ?
Is your plugin multi-thread ?
Many things can make it be slower ...

Can you be more precise about the way your plugin work ?
Posted: 11th Jun 2007 21:46
1) It is, indeed, a plugin and not a DLL
2) The plugin uses Asm-created graphic routines. No DBPro routines
3) The plugin is not multi-thread

Upon further testing, I've indicated the problem is backbuffer related. My routine draws to an allocated buffer. The buffer is then copied to the DBPro backbuffer. It is the copying that is slowing the process. If I remove DBPro's copy memory statement, the routines FPS increases from 6FPS to 120+ FPS. Is there any known fast method to copy to DBPro's backbuffer?