![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
osg
文章平均质量分 76
-TianSF-
-
展开
-
osg create line
inline osg::Geometry* createLine(const std::vector<osg::Vec3>& allPTs, osg::Vec4 color, osg::PrimitiveSet::Mode model = osg::PrimitiveSet::LINE_STRIP, float nWidth = 2) { int nCount = all...原创 2020-03-11 09:54:44 · 209 阅读 · 0 评论 -
osg 顶点属性
osg::Geometry* createLine2(const std::vector<osg::Vec3d>& allPTs, const std::vector<osg::Vec3d>& colors, osg::Camera* camera) { cout << "osg::getGLVersionNumber" << os...原创 2020-02-19 21:15:35 · 696 阅读 · 0 评论 -
shader snippets
shdr precision highp float; uniform float time; uniform vec2 resolution; varying vec3 fPosition; varying vec3 fNormal; Ward float Ward(vec3 lightDir, vec3 viewDir, vec3 normal, float exponent) { ...原创 2019-09-24 09:55:20 · 161 阅读 · 0 评论 -
osg visitor 扩展
#include "stdafx.h" #include <iostream> #include <osg/NodeVisitor> #include <osg/Node> #include "osg/Group" #include "osgDB/readfile" #include <osg/Geode> using namespace std; ...原创 2019-09-11 09:12:33 · 178 阅读 · 0 评论 -
osg 图元重启
osg::Geometry* createLine2(const std::vector<osg::Vec3d>& allPTs, osg::Vec4 color) { int nCount = allPTs.size(); osg::ref_ptr<osg::Geometry> pGeometry = new osg::Geometry(); osg:...原创 2019-08-26 16:44:32 · 285 阅读 · 1 评论 -
osg lib
OpenThreads.lib osg.lib osgDB.lib osgUtil.lib osgGA.lib osgViewer.lib osgManipulator.lib osgText.lib OpenThreadsd.lib osgd.lib osgDBd.lib osgUtild.lib osgGAd.lib osgViewerd.lib osgMani...原创 2018-07-08 15:43:28 · 494 阅读 · 0 评论 -
osg tree
#include <osgDB/ReadFile> #include <osgViewer/Viewer> #include <osg/Geometry> #include <osg/Texture2D>#include <osgDB/WriteFile> #include <osgViewer/Viewer> #include <osgViewer/ViewerEventHandlers>#inc原创 2017-12-03 23:18:35 · 348 阅读 · 0 评论 -
OSG场景保存
osgDB::Registry::instance()->writeNode(*m_rootNode, “TestAA.ive”, osgDB::Registry::instance()->getOptions());场景保存,找了好久才找到的。原创 2015-04-25 01:01:18 · 1133 阅读 · 0 评论 -
osg::NotifyHandler
class MyNotifyHandler : public osg::NotifyHandler { public: void notify(osg::NotifySeverity severity, const char *message) { TRACE( “\n MyNotifyHandler) ” message); } };os原创 2017-07-04 17:39:00 · 354 阅读 · 0 评论 -
osg::ref_ptr
class Test : public osg::Referenced { public: Test(); ~Test();private:};Test::Test() {}Test::~Test() {}void foo() { osg::ref_ptr t = new Test; t = nullptr;原创 2015-04-29 17:12:05 · 555 阅读 · 0 评论