From: Mickael B. <mba...@gm...> - 2012-06-25 09:53:41
|
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 |