wx under 1.36 not drawing images

BlitzMax Forums/Brucey's Modules/wx under 1.36 not drawing images

Pete Rigz(Posted 2010) [#1]
For some reason images are not being drawn since updating to 1.36, and the latest rev 667 of wxmax. here's an example (the wxglmax2d sample modified to draw an image from media folder):



Works fine under 1.35 rev 666. Can't see any obvious reasons why... Any ideas?


Pete Rigz(Posted 2010) [#2]
Amazing what a good nights sleep can do for you, it was quite obvious after all :)

the bug is in wxglmax2d, in Createfrompixmap method of TGLImageFrame, from line 258 it looks like:

		'done!
		Local frame:TGLImageFrame=New TGLImageFrame
		frame.name=name
		frame.u1=Float(width)/Float(tex_w)
		frame.v1=Float(height)/Float(tex_h)
		Return frame


but copying from glmax2d it should be:

		'done!
		Local frame:TGLImageFrame=New TGLImageFrame
		frame.name=name
		frame.uscale=1.0/tex_w
		frame.vscale=1.0/tex_h
		frame.u1=width * frame.uscale
		frame.v1=height * frame.vscale
		Return frame


without that the uv coords were all being set to 0.


Brucey(Posted 2010) [#3]
Updated. Thanks :-)