OpenGL & Threads

  1. 5 days ago

    Ramon S

    Nov 8 Pre-Release Testers, Xojo Pro UPC, Europe (Barcelona, Spain)

    Although I've only seen this on Windows I imagine it is something common for all environments.
    We know that we can not access the user interface from a thread. If we do we raise a runtime exception (here is this text taken from Language Reference: Thread):

    Do not access any built-in property or method of a user interface control or Window from within a Thread as platform UI frameworks are not thread-safe. Doing so raises a ThreadAccessingUIException. See below for additional information.

    However if you try some OpenGL.method from a thread, you get no Exception but that method is not executed. at least when you refresh the OpenGLSurface, there is nothing that was done from a thread. So, be careful because you get no warning, but the result is not the one expected.

or Sign Up to reply!