libmx 1.03: Documentation

libmx is a 2D/3D C++ library built on top of SDL and other technlogies used to create 2D/3D multimedia applications. It works for Mac OS X, Windows, and Linux and you can download the source code @ http://lostsidedead.com/svn in the haze repo. Or Issue the following:

$ svn co svn://lostsidedead.com/haze/trunk/libmx

more information about compilation of the library is available in the README file.
or for Mac OS X you can download the framework: mx.framework Leopard i386 or mx.framework Snow Leopard x86_64

Example Skeleton Program

/* 
 Example of mx framework
  to compile:
 
$ g++ -framework mx -framework Cocoa -framework OpenGL example.cc -o example -lSDLmain
 
*/

#include<mx/mx.h>

namespace example  {
	class Example : public mx::mxWnd {
		mx::Color white;
	public:
		Example();
		virtual ~Example() { }
		virtual void eventPassed(SDL_Event &e);
		virtual void renderScreen();
	};
	Example::Example() : mxWnd(640, 480, 0) {
		setTitle("Example");
		white = mx::Color(255,255,255);
	}
	void Example::renderScreen() {
		mx::mxSurface &surface = mxrenderSurface();
		mx::mxPainter paint(surface);
		paint.fillRect(0, 0, 640, 480, white);
		surface.Flip();
	}
	void Example::eventPassed(SDL_Event &e) {
		mxWnd::eventPassed(e);
	}
}

int main(int argc, char **argv) {
	try {
		example::Example examp;
		return examp.messageLoop();
	} 
	catch( mx::mxException<std::string> &e ) {
		e.printError(std::cerr);
	}
	catch( std::exception &e ) {
		std::cerr << e.what() << "\n";
	}
	catch( ... ) {
		std::cerr << "unknown error...\n";
	}
	return EXIT_FAILURE;
}


Examples
Download Example
OpenGL Example

Example Projects
Mutatris
Current
HPPD-Light
Ultimate MasterPiece3D



Generated on Wed Jun 10 08:40:50 2009 for libmx by  doxygen 1.5.8