I use PB to create a 2D/3D editor.
And I feel that since i use PB 5.21 there are some problems with mixed 2D and 3D stuff in one program.
The last one is some stuff with mouse movements in screen mode.
and the speed in 2D to draw stuff on the screen.
On the other side, I use blender to edit and position my created meshes.
If I am correct ??
- Blender is developed in Python, and python is a interpretor.
- I did some stuff in Purebasic, and i think PB is a compiler who compiles all to ASM. ??
Q1) is my thinking correct ?
I think this a software problem since blender works very, very fast.
But PB is slow in 2D/3D mixed stuff.
Q2) Is there a good alternative solution to use fast 2D and 3D designing in PB 5.21 ... and later ?
thanks,
marc
PureBasic <> Python 2D/3D commands
PureBasic <> Python 2D/3D commands
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
PS: sorry for my english I speak flemish ...
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PureBasic <> Python 2D/3D commands
From Blender.org:
Is the PB 2D slowness the fault of PB/Ogre or could your code design be better? Or perhaps you need to swap Ogre for something else?
So, the main code is likely C/C++ and Python used for scripts/may be User coding (a lot of CAD-CAM apps have this facility for Users and the User coding language varies widely, from bespoke to VBA/VBS, Lua, LSP etc.)Blender is an open source project licensed under the GNU GPL. All code is written in C, C++ and Python.
Is the PB 2D slowness the fault of PB/Ogre or could your code design be better? Or perhaps you need to swap Ogre for something else?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: PureBasic <> Python 2D/3D commands
Do you use Sprites to draw on the screen? Directly drawing to screen is probablymarc_256 wrote:and the speed in 2D to draw stuff on the screen.
slow, because the screen memory is located in 'external' graphics card memory.
Using sprites and bitmap fonts should be much faster, but you didn't give much
info nor an example of what you meant.
Re: PureBasic <> Python 2D/3D commands
As Danilo said it's better to use sprites for 2D drawing especially if your using OpenGL.
Your comparing your project to Blender which has several expert programmers working on it.
It would be a good idea to post an example showing your speed issues. That way others might be able to help you.
Edit:
I should also mention that although Blender was programmed in C, C++, and Python. They use OpenGL to render everything onto the screen, including the user interface.
Purebasic's 2D/3D is fast if you use sprites, but it also depends on how well you code your apps.marc_256 wrote:I think this a software problem since blender works very, very fast.
But PB is slow in 2D/3D mixed stuff.
Your comparing your project to Blender which has several expert programmers working on it.
It would be a good idea to post an example showing your speed issues. That way others might be able to help you.
Edit:
I should also mention that although Blender was programmed in C, C++, and Python. They use OpenGL to render everything onto the screen, including the user interface.
Re: PureBasic <> Python 2D/3D commands
thanks everyone for your advices,
and it works fast if I use only 2D drawing screen tools.
But when I use a mix of 3D / 2D / and direct drawing on the screen,
the mouse jumps in steps, and every redrawing is very slow.
And direct text drawing is a problem.
I don't think this is a Ogre problem.
but text is draw in direct 2D mode.
So, I have to redraw all on sprites ...
I found your GDI+
But is only Windows, so if I want to use multi platform (Win, Linux), I need to use OpenGL.
But is very good stuff.
But than I still have the mesh problem to solve.
The total program is more than 2.600.000 lines long now, so I need to find some parts of it to show.
Abouth OpenGL, i did some tests, but I have some troubles about meshes.
see http://www.purebasic.fr/english/viewtop ... 36&t=56020
Who works very well in DirectX, but than I can't direct draw text on the screen.
Use PB 5.21 and Win 8.1 - 64 bits
Well everything works very fast if I use only ogre,IdeasVacuum wrote:Is the PB 2D slowness the fault of PB/Ogre or could your code design be better?
Or perhaps you need to swap Ogre for something else?
and it works fast if I use only 2D drawing screen tools.
But when I use a mix of 3D / 2D / and direct drawing on the screen,
the mouse jumps in steps, and every redrawing is very slow.
And direct text drawing is a problem.
I don't think this is a Ogre problem.
I use sprites for all my CAD Menu/Tools/Cursor ...Danilo wrote: Do you use Sprites to draw on the screen? Directly drawing to screen is probably
slow, because the screen memory is located in 'external' graphics card memory.
Using sprites and bitmap fonts should be much faster, but you didn't give much
info nor an example of what you meant.
but text is draw in direct 2D mode.
So, I have to redraw all on sprites ...
I found your GDI+
But is only Windows, so if I want to use multi platform (Win, Linux), I need to use OpenGL.
But is very good stuff.
Yes, I go convert all the text info on sprites, so I can use OpenGL.Samuel wrote:As Danilo said it's better to use sprites for 2D drawing especially if your using OpenGL.
Purebasic's 2D/3D is fast if you use sprites, but it also depends on how well you code your apps.marc_256 wrote:I think this a software problem since blender works very, very fast.
But PB is slow in 2D/3D mixed stuff.
Your comparing your project to Blender which has several expert programmers working on it.
It would be a good idea to post an example showing your speed issues. That way others might be able to help you.
But than I still have the mesh problem to solve.
The total program is more than 2.600.000 lines long now, so I need to find some parts of it to show.
Abouth OpenGL, i did some tests, but I have some troubles about meshes.
see http://www.purebasic.fr/english/viewtop ... 36&t=56020
Who works very well in DirectX, but than I can't direct draw text on the screen.
Use PB 5.21 and Win 8.1 - 64 bits
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
PS: sorry for my english I speak flemish ...

