GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

Issues when adapting to MoltenGL to migrate to Metal

Open allenlinli opened this issue 5 years ago • 0 comments

There's a framework MoltenGL which provides integration for adapting to Metal.

But there is some code from Core Video that MoltenGL cannot convert to Metal directly, so I have to convert them to Metal format first.

The code is:

glBindTexture(CVOpenGLESTextureGetTarget(renderTexture), CVOpenGLESTextureGetName(renderTexture));
_texture = CVOpenGLESTextureGetName(renderTexture);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, _textureOptions.wrapS);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, _textureOptions.wrapT);

glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,GL_TEXTURE_2D,CVOpenGLESTextureGetName(renderTexture), 0);

Is it possible for me to do this? I post the question on Stack Overflow, too.

I think there are many people who need this adaption, too, because it's too hard to adapt to GPUImage 3 with proper OpenGL and Metal knowledge.

allenlinli avatar Jul 05 '19 08:07 allenlinli