wxMax compile errors with BlitzMax 1.35

BlitzMax Forums/Brucey's Modules/wxMax compile errors with BlitzMax 1.35

Ole JR(Posted 2009) [#1]
Compiling:wxglmax2d.bmx
Compile Error: Unable to create new object of abstract type 'TGLMax2DDriver' due to abstract method 'SetResolution'
[/BlitzMax/mod/wx.mod/wxglmax2d.mod/wxglmax2d.bmx;504;2]


Compiling:wxmax2d.bmx
Compile Error: Unable to create new object of abstract type 'TwxMax2DDriver' due to abstract method 'SetResolution'
[/BlitzMax/mod/wx.mod/wxmax2d.mod/wxmax2d.bmx;457;2]

Windows 7, BlitzMax 1.35

Ole JR


Pete Rigz(Posted 2009) [#2]
I just came across this as well, it's because the T2dMax2dDriver has changed a bit which wxglmax2d extends. The only thing that needs doing to fix this is to copy this into the TGLMax2dDriver type in wxglmax2d.bmx

	Method SetResolution(width:Float, height:Float)
		glMatrixMode GL_PROJECTION
		glLoadIdentity
		glOrtho 0,width,height,0,-1,1
		glMatrixMode GL_MODELVIEW
	End Method


Just plonk it at the end of the type and you should be good to go.

[edit]Just noticed the other error in wxmax2d, I just added:

	Method SetResolution(width:Float, height:Float)
		
	End Method


in the TwxMax2DDriver type for now. I think it's only used to set the virtual resolution which probably doesn't have much use in an app.


Pete Rigz(Posted 2009) [#3]
Just for the record, if the wxGLcanvas in your app is resized then you need to call SetVirtualResolution(canvas_width,canvas_height) now as well, otherwise things will look a bit squished :)


DavidDC(Posted 2009) [#4]
Thanks Pete


Armitage 1982(Posted 2009) [#5]
Could it be the same problem with CeGUI ??
Work in Release Mode but won't link in Debug Mode !?


Spacechimp(Posted 2009) [#6]
Fix is Here:

http://code.google.com/p/wxmax/source/detail?r=666


Imphenzia(Posted 2009) [#7]
If anyone gets this to work in 1.36, please advise:)


Ole JR(Posted 2009) [#8]
It's updated in rev.667, and atleast compiles here on win7/opensuse.


Imphenzia(Posted 2009) [#9]
Thanks, 667 works great :)