BlitzMax language binding

Hi folks :slight_smile:

I’m in the process of writing a BlitzMax language binding for openFrameworks.
Well, I only started it on Friday, but most of the fundamentals are up and running on both Windows and Mac, and I’ve added a couple of examples.

As you can see, the binding mirrors the API very closely, which makes it very easy to port the C++ examples over. (apart from operator overloads… where we have to use a little poetic-license)

	Method update()  
		Local newFrame:Int = False  
		newFrame = vidGrabber.isFrameNew()  
		If newFrame Then  
			colorImg.setFromPixels(vidGrabber.getPixels(), 320,240)  
			If learnBackground = True Then  
				learnBackground = False  
			End If  
			' take the abs value of the difference between background   
			' and incoming and then threshold:  
			grayDiff.absDiff(grayBg, grayImage)  
			' find contours which are between the size of 20 pixels and  
			' 1/3 the w*h pixels.  
			' also, find holes is set to true so we will get interior  
			' contours as well....  
			contourFinder.findContours(grayDiff, 20, (340*240)/3, 10, True)  
		End If  
		If KeyHit(key_escape) Then  
		End If  
	End Method  

It doesn’t use GLUT, because it has it’s own GL Context handling framework, and we can mix both BlitzMax native graphics functions with openFrameworks, which is kinda cool.
I’m also looking at wxWidgets GLCanvas integration (once I get a better understanding of the event system in openFrameworks), which could be useful.

With my suite of BlitzMax modules, I can see some interesting experiments - like with Box2D or Chipmunk.


May I congratulate everyone on such an excellent framework. It has been so easy to bind.