wxMax questions

BlitzMax Forums/Brucey's Modules/wxMax questions

rs22(Posted 2010) [#1]
Hi,

Is it possible to link DirectX Max2D to a wxMax window like you can with a canvas in MaxGUI? Is there a sample showing this?

Can you get a wxImage from a Pixmap? I think you can with wxBitmap, right?

Is wxGLMax2D feature-complete? I ask because it doesn't appear to support TImageFont.

Thanks!


Brucey(Posted 2010) [#2]
Is it possible to link DirectX Max2D to a wxMax window like you can with a canvas in MaxGUI

Yes. I believe so. I think you just need the HWND from a wxWindow, and then call something like TD3D7Graphics.Attach(hwnd, flags) to connect the two together. Or, with TD3D7Max2DDriver, you can call AttachGraphics(), with the same params.

The wxWindow method is GetHandle(). It returns a Byte Ptr, but you can cast that to an Int like this :
Local hwnd:Int = Int Ptr(window.GetHandle())[0]


Can you get a wxImage from a Pixmap? I think you can with wxBitmap, right?

wxImage is a platform-independent image type, but can take raw data from a wxBitmap (with the ConvertToImage() method), which has a CreateFromPixmap() method for conversion.

Is wxGLMax2D feature-complete? I ask because it doesn't appear to support TImageFont.

It should do. wxGLMax2D is an implentation of Max2D, which is where TImageFont functionality is defined. So it should "just work".

I'm afraid I don't have time to put together a little example of DX support, as I'll be offline for a week beginning tomorrow. Bad timing... :-/
But I'll put something together on my return :-)