设为首页 加入收藏

TOP

OpenGL ES 渲染立体图形(三)
2019-08-31 00:19:58 】 浏览:95
Tags:OpenGL 渲染 立体 图形
GLKMatrix4 projectionMatrix
= GLKMatrix4MakePerspective(GLKMathDegreesToRadians(90.0), aspect, 0.1, 10.0); //设置等比缩放 projectionMatrix = GLKMatrix4Scale(projectionMatrix, 1.0, 1.0, 1.0); self.mEffect.transform.projectionMatrix = projectionMatrix; //设置平移:Z轴负方向平移2.0 GLKMatrix4 modelViewMatrix = GLKMatrix4Translate(GLKMatrix4Identity, 0.0, 0.0, -2.0); self.mEffect.transform.modelviewMatrix = modelViewMatrix; //设置定时器 double seconds = 0.1; timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, dispatch_get_main_queue()); dispatch_source_set_timer(timer, DISPATCH_TIME_NOW, seconds*NSEC_PER_SEC, 0); dispatch_source_set_event_handler(timer, ^{ self.xDegree += 0.1*self.XB; self.yDegree += 0.1*self.YB; self.zDegree += 0.1*self.ZB; }); dispatch_resume(timer); }

 

效果:

 

GitHub

首页 上一页 1 2 3 下一页 尾页 3/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇iOS 折线图、柱状图的简单实现 下一篇iOS开发简记(9):APPStore审核

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目