wx max2d

BlitzMax Forums/Brucey's Modules/wx max2d

Azan(Posted 2009) [#1]
Hello everyone, I am attempting to run the max2d sample located in "wx.mod\samples\max2d.bmx" but it keeps crashing when I run it.

All it manages to do is create a window then lockup and crash. After some debugging I determined if I comment out the following line

ConnectAny(wxEVT_PAINT, OnPaint)


it works. However obviously nothing gets drawn then. The cube demo works just fine however. I installed a prebuilt binary, I'll try compiling from source, but if anyone has any ideas I would appreciate it.


Tommo(Posted 2009) [#2]
Prebuilt wxMax is built with old version BMax(1.33 or older). There were some change on Max2D since 1.35, I think that's why it crashed.
SVN version wxMax is fixed for 1.36, you have to use that instead.


Azan(Posted 2009) [#3]
That fixed it, thank you very much!


Azan(Posted 2009) [#4]
Alright, now I have hit another problem. I want to preserve all the Max2D commands in my canvas. I looked at the Max2D example but that used a wxwindow as the canvas and blendmodes didn't work.

I searched the forums quite a bit and I think I discovered that my canvas needs to be a wxGLCanvas is that correct? I went through the process of converting my code by using the glmax2d sample but now I cannot draw images. I can draw rectangles just fine, but images don't work. The images are loading and I have imported brl.pngloader.

It's just that when I draw the images they do not show up, any ideas?


UPDATE: Found the graphics sample, which worked for my needs. I can't resize my window, but eh.