• @JonB thank you for the reply, I will look into implimenting a fix soon.
    I have been trying to extend the Header Parser that I used for OpenGLES to include most of the iOS headers.
    So far it seems to work well...

  • It would be very cool :-)

  • I have updated the GitHub repo to represent the current work. I have more or less temporariely resolved the issue by calling reload(GLKit.view) in main.py how ever this is really only a temporary fix. I will look into some of the methods that omz uses to retain the globals/delegate methods.

  • Ok I have got it to render the image to a file however the render image is still incorrect.
    Script available here

    It now renders in black and white.

    Any ideas?

  • This could be a great potential use case for In App Purchases in the future ;)

  • Welcome and ok.
    Will do a bit more research into why the crash is occurring then.
    Current code

    class CBlock(ObjCBlock): def __init__(self, func, restype=None, argtypes=None): super(CBlock, self).__init__(func, restype=None, argtypes=None) self.func = func type_encodings['@?'] = CBlock default_opt = { 'GLKTextureLoaderApplyPremultiplication': 0, 'GLKTextureLoaderGenerateMipmaps': 0, 'GLKTextureLoaderOriginBottomLeft': 0, 'GLKTextureLoaderGrayscaleAsAlpha': 0, 'GLKTextureLoaderSRGB': 0 } DEFAULTS = ns(default_opt) class GLKTextureLoader: def __init__(self, sharegroup=None): if sharegroup is None: sharegroup = currentContext().sharegroup print sharegroup tl = ObjCClass('GLKTextureLoader') self._loader = tl.alloc().initWithSharegroup_(sharegroup._sharegroup) def textureFromFile(self, path): callback = CBlock(GLKTextureLoaderCallback, restype=None, argtypes=[ctypes.c_void_p, ctypes.c_void_p]) print dir(self._loader) print DEFAULTS # self._loader.textureWithContentsOfFile_options_queue_completionHandler_(path, DEFAULTS, None, callback)

    Note currentContext() is just a wrapper for EAGLContext.currentContext() where EAGLContext has not been allocated or initialised.

  • @omz that seemed to fix it. Thanks

  • @ywangd that has resolved the issue, thank you for the infomation about it

  • @JonB and @Cethric - this seems to imply that the JS runtime system is highly optimized for JSON encoding and decoding. That would not be a big surprise. The new method for transferring the data seems to also confirm that moving all the data in a single blob and with a single call back into python is the best strategy. I was thinking that the send_to_python call could also be running faster if the JSON method is handled via a http POST like mechanism rather then a http PUT. It certainly is interesting.

  • Awesome.

  • Nevermind, it is fixed now, I don't really know what I did but it is working now.

  • That fixed the issue, thanks you @JonB

  • Working on an example file main.py to test shaders and rendering. However I cannot get the view to show a cube I think the issue is with the MVP however I do not know at what point I am going wrong, can someone please look at it and let me know
    For simplicity I am using the euclid.py math library.

    Thanks in advanced.

  • the other approach, which may be faster, would be to build a list structure of all themesble objects, one time. then, you dont need to recurse through views, which might be slow due to repeated subviews calls, and the recursive nature, which involves many slow function calls. so, build a list one time (or, if you have a lot of dynamic components, youll have to keep track of them as they are added /deleted)

    this would let you use list comprehension or maps to set the attributes, looping one time over the list which you have already prefiltered (eliminating all those other checks for name, etc). since list comprension /maps are optimized in c, it might yield better performance.

Internal error.

Oops! Looks like something went wrong!