PureBasic is a great rapid application programming language. Although at first the dialect is a little strange, I found it's easy to get used to and adapt to. Compared to other Basic dialects, it has nice advantages.
One thing I would like to see within PureBasic is increased CROSS-PLATFORM support. Specifically, OSX. I realize this is a ways, off, but I just wanted to voice my concerns.
MY CONCERNS:
I see a large number of examples in the coding sections using Win32 specific API calls. Although this helps increase program optimization, it doesn't allow for cross-platform compilation.
Additionally, when trying to accomplish more advanced programming topics, (such as image memory manipulation, window callbacks, etc) it'd be nice to have such commands available as a PureBasic command rather than going through OS specific API calls.
I see a lot of examples that use API calls suchas "getDIBits_" which cannot translate as efficiently to the Mac. It would be nice to consolidate these items so the code doesn't need translation.
I realize that on OSX Purebasic cannot access video memory directly, but there should be some type of access to image memory for direct manipulation, or even using the CG context in the same way that handles are used on windows.
EXAMPLE:
hWnd= StartDrawing(ImageOutput(1))
shouldn't this return the CG quartz context for the Mac?
(see the MacOS forums for my Cairo problems)
OTHER POINTS:
Drawing modes that aren't availble in OSX should map to something else, so that translation again, isn't needed. Example: StartDrawing(ScreenOutput()) could be mapped to whatever current quartz context is activated.
Finally, I won't jump on the OSX intel/universal binary bandwagon, but it shouldn't be ignored since that is where the Mac lot is going.
Just come thoughts, good luck to Fred and the team on future OSX versions. I'll be looking forward to them!
Mac OSX support
-
- New User
- Posts: 9
- Joined: Wed Feb 13, 2008 12:58 am
- Location: California
- Joakim Christiansen
- Addict
- Posts: 2452
- Joined: Wed Dec 22, 2004 4:12 pm
- Location: Norway
- Contact:
-
- Enthusiast
- Posts: 796
- Joined: Tue May 20, 2008 2:12 am
- Location: Cologne, Germany
- Contact:
Re: Mac OSX support
Just want to comment on this... I think ScreenOutput() is desperately needed for fullscreen-applications, and -gamesadamredwoods wrote:OTHER POINTS:
Drawing modes that aren't availble in OSX should map to something else, so that translation again, isn't needed. Example: StartDrawing(ScreenOutput()) could be mapped to whatever current quartz context is activated.
to be coded. Today I tried to display an created image in fullscreen-mode. It was not possible because of the
missing ScreenOutput() on Mac OS X-version of PB.
You may try this on Mac OS X, and you will get a nice .bmp-image with some text inside your current directory,
but it won't be displayed on screen, because ScreenOutput() is missing

I don't know, how OpenGL handles buffers, but it would be very nice to have a displayable buffer to draw to...

Code: Select all
If InitSprite() = 0 Or InitKeyboard() = 0
MessageRequester("Error", "Can't open DirectX 7", 0)
End
EndIf
OpenScreen(1280,800,32,"test")
LoadFont(0,"Arial", 12)
CreateImage(0, 200,20)
If StartDrawing(ImageOutput(0)) ; this works!
DrawingFont(FontID(0))
DrawText(1,1, "Hello, World!")
StopDrawing()
EndIf
SaveImage(0,"image.bmp")
Repeat
FlipBuffers(#PB_Screen_SmartSynchronization)
ExamineKeyboard()
StartDrawing(ScreenOutput()) ; says, specified output is zero
DrawImage(ImageID(0), 100,100)
StopDrawing()
Until KeyboardPushed(#PB_Key_Escape)
CloseScreen()
Regards,
JamiroKwai
JamiroKwai