上一页 1 ··· 7 8 9 10 11
摘要: #include #include #include #include #include #include #include #include #include #include #include std::set pointSet; osg::ref_ptr geode = new osg::Geode; void subdivide(float v1x, float v1y, float... 阅读全文
posted @ 2017-10-19 10:58 唐淼 阅读(540) 评论(0) 推荐(0) 编辑
摘要: 效果图: 实现原理来自: https://stackoverflow.com/questions/9600801/evenly-distributing-n-points-on-a-sphere/26127012#26127012 https://zhuanlan.zhihu.com/p/25988 阅读全文
posted @ 2017-10-19 10:29 唐淼 阅读(2014) 评论(0) 推荐(0) 编辑
摘要: 这个函数最近折磨了我很久很久,因为需要用osg截图保存到本地,但是这个图片要具有alpha值,也就是背景的alpha值全为0,但是在公司上用_image->readPixels(448, 28, 1024, 1024, GL_RGBA, GL_UNSIGNED_BYTE);截图出来的是成功有alph 阅读全文
posted @ 2017-10-09 14:54 唐淼 阅读(2321) 评论(0) 推荐(0) 编辑
摘要: osg::BlendFunc介绍 混合是什么呢?混合就是把两种颜色混在一起。具体一点,就是把某一像素位置原来的颜色和将要画上去的颜色,通过某种方式混在一起,从而实现特殊的效果。 假设我们需要绘制这样一个场景:透过红色的玻璃去看绿色的物体,那么可以先绘制绿色的物体,再绘制红色玻璃。在绘制红色玻璃的时候 阅读全文
posted @ 2017-09-22 14:44 唐淼 阅读(1625) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11