CVOpenGLESTextureCache (CoreVideo)

This topic contains 1 reply, has 2 voices, and was last updated by  Bill Hollings 3 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #615


    Hi everyone,

    Thank you all for previous support, but we have a next question/issue for MetalGL

    In short, we use CoreVideo’s cache CVOpenGLESTextureCache and it uses OpenGLES context with it’s private API, that’s why our app crashes:

    -[MGLEAGLContext GetMacroContextPrivate]: unrecognized selector sent to instance

    Is it possible for MetalGL to implement that private API?

    But there could be an another way: CVMetalTextureCache

    But in that case we get CVMetalTextureRef from CVMetalTextureCacheCreateTextureFromImage instead of CVOpenGLESTextureRef from corresponding OpenGL’s method.

    Basically we cannot feed that kind of texture to (we have crash there):

    glBindTexture(CVOpenGLESTextureGetTarget(_texture), CVOpenGLESTextureGetName(_texture));

    Could you suggest a solution for this kind of problem?

    Ilnar A.


    Bill Hollings


    Interesting issue.

    Since much of the CVOpenGLES... family of functions and structs are opaque, it will be a challenge to provide an effective and complete implementation directly. In the longer term, we might consider doing so.

    However, your second suggestion, of extracting Metal textures from CoreVideo makes a lot of sense.

    What is currently missing from MetalGL to allow this to happen is the ability to create an OpenGL texture reference from the Metal texture returned from CVMetalTextureCacheCreateTextureFromImage, so that it can be used in functions like glBindTexture().

    One of the goals of MetalGL is to provide the ability to combine OpenGL and Metal functionality, so this is definitely something we have planned. It should be fairly straightforward, and we should be able to make that available by the end of this month. I’ll post more here when it is ready.


Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘MoltenGL Support’ is closed to new topics and replies.