
osg
文章平均质量分 76
不如学也
-
展开
-
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 · 245 阅读 · 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 · 751 阅读 · 0 评论 -
shader snippets
shdrprecision highp float;uniform float time;uniform vec2 resolution;varying vec3 fPosition;varying vec3 fNormal;Wardfloat Ward(vec3 lightDir, vec3 viewDir, vec3 normal, float exponent){ ...原创 2019-09-24 09:55:20 · 203 阅读 · 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 · 206 阅读 · 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 · 341 阅读 · 1 评论 -
osg lib
OpenThreads.lib osg.lib osgDB.lib osgUtil.lib osgGA.lib osgViewer.lib osgManipulator.lib osgText.libOpenThreadsd.lib osgd.lib osgDBd.lib osgUtild.lib osgGAd.lib osgViewerd.lib osgMani...原创 2018-07-08 15:43:28 · 528 阅读 · 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 · 377 阅读 · 0 评论 -
OSG场景保存
osgDB::Registry::instance()->writeNode(*m_rootNode, “TestAA.ive”, osgDB::Registry::instance()->getOptions());场景保存,找了好久才找到的。原创 2015-04-25 01:01:18 · 1168 阅读 · 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 · 405 阅读 · 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 · 589 阅读 · 0 评论