Is there a workaround to use cegui with leadwerks?

BlitzMax Forums/Brucey's Modules/Is there a workaround to use cegui with leadwerks?

Blitzbat(Posted 2010) [#1]
Hi!

Is there a workaround to get cegui running with leadwerks?
I just get a conflict with max2d because of the freeimage mod.

Thanks


Brucey(Posted 2010) [#2]
I've no idea.

What's the problem with the FreeImage module?


Blitzbat(Posted 2010) [#3]
it imports the max2d module... But max2d is conflicting with leadwerks...

Here the error: Compile Error: Duplicate identifier 'DrawText' in modules 'brl.max2d' and 'leadwerks.engine'


Brucey(Posted 2010) [#4]
FreeImage requires TImage (for obvious reasons), which is defined in Max2D.

I can't believe that Max2D would conflict with anything, because it is designed as a generic module. You plug in other modules on top of that - like GLMax2D, or MyOwnRendererMax2D module, for example.

The only thing I can think of, is that either leadwerks defines its own max2d module, or has some types with the same name - which would be a rather silly thing to do.

Can you post the exact error message? It might help make things more clear. Before I throw blame around ;-)


Blitzbat(Posted 2010) [#5]
Thats the only error message i get. It's because leadwerk has a set of 2d commands that are identical to max2d. See here: http://www.leadwerks.com/wiki/index.php?title=2D_Drawing .


Brucey(Posted 2010) [#6]
Well, that was a silly thing to do... basically ruling out the use of third party modules with leadwerks which require access to "built-in" types...

The reason I'm using FreeImage for CEGUI is because I already had it.
It can work with other image loaders, apparently, but to do that it would require the image stuff separated into other modules... which is a bit too much work, I think.

If leadwerks re-implements all of the Max2D functionality, you may get away with pointing FreeImage to leadwerks instead... but I wouldn't count on it working...


Blitzbat(Posted 2010) [#7]
okay... thank you for your quick response... i will talk to josh ;)