ios OpenGL
HDLX刘乔泓
这个作者很懒,什么都没留下…
展开
-
iOS OpenGL Texture 转为 UIImage 的方法
iOS OpenGL Texture 转为 UIImage 的方法- (UIImage *)imageFromTextureWithwidth:(int)width height:(int)height { // glActiveTexture(GL_TEXTURE1); 先绑定某个纹理 int size = width * height * 4; GLubyte *buffer = malloc(size); glReadPixels(0, 0, width, heigh原创 2020-10-30 23:51:22 · 676 阅读 · 0 评论 -
iOS UIImage转为OpenGL Texture的方法
iOS UIImage转为OpenGL Texture的方法import Foundationimport UIKitimport OpenGLESextension UIImage { func createGLTexture() -> GLuint { let cgImageRef = self.cgImage if cgImageRef == nil { return 0 }原创 2020-10-30 23:45:33 · 374 阅读 · 0 评论