From: Arno P. <ar...@pu...> - 2012-06-25 10:59:52
|
checkout trunk/crossmobile, then look for a file called advisor.xml. In that file do a grep on "toString". This is an example on how a method toString() is injected to class NSString. You should be able to do the same for a method called layerClass. Once you have done that, do a "ant gen-xmlvm-ios" in crossmobile. This will re-generate the iOS API in ../xmlvm. For this to work you need to point property sdk.path in xmlvm.properties to an installation of the iOS 4.3 SDK (note that crossmobile cannot deal with 5.* API yet). Arno On 6/25/12 11:53 AM, Mickael Barbeaux wrote: > Hi everyone, > > I recently switched to the new C iOS API backend, and it really works well ! > I'm currently working at implementing an OpenGLES 2.0 interface for > developing my own custom game renderer, based on what was done before on > the old C API backend. > > My main concern is about the way to define the layer class on a UIView. > As you may know, I order to use an OpenGLES 2.0 renderer inside a > UIView, Apple recommend to add this method inside your UIView subclass : > > + (Class) layerClass > > { > > return [CAEAGLLayer class]; > > } > > > But how to reach the same effect using XMLVM ? > It seems that the UIView implementation is based on a ObjC wrapper class > (UIViewWrapper), but it is generated by XMLVM at XCode project > generation, and it seems I have no way to modify it. > As the method to implement is "static" (class method), I didn't find a > way to "override" it inside my UIView java subclass. Using a delegate > method won't help either. > > How can I process to achieve what I want to do ? > Should I do the same way as for the old C iOS API, that's to say > duplicate the UIView class and create a UIViewGL class with specific > implementation using the CAEAGLLayer class ? But then, how can I add the > "layerClass" inside the wrapper implementation, as it is now generated > automatically by the new iOS API ? > > Mickael > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > |