osg自带窗口去掉边框

#ifdef _WIN32
#include <Windows.h>
#endif // _WIN32
#include<iostream> #include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>
#include <osgViewer/CompositeViewer>
#include <osgDB/ReadFile>
#include <osg/Geode>
#include <osg/Node>
#include <osg/Geometry>
#include <osgGA/TrackballManipulator>
#include <osg/GraphicsContext>
#include <osg/ShapeDrawable>
#include <osg/Material>
#include <osg/Image>
#include <osg/Texture2D>
#include <osg/TexEnv>
#include <osg/TexGen>
#include <osg/MatrixTransform>
#include <osg/PositionAttitudeTransform>
#include <osg/AnimationPath>
#include <osg/Matrixd> #include <osgGA/GUIEventHandler>
#include <osgGA/CameraManipulator>
#include <osgGA/StandardManipulator>
#include <osgGA/OrbitManipulator>
#include <osgGA/TrackballManipulator>
#include <osgUtil/IntersectionVisitor>
#include <osgUtil/LineSegmentIntersector> int main()
{
osg::ref_ptr<osgViewer::Viewer> viewer = new osgViewer::Viewer;
osg::ref_ptr<osg::Node> node1;
osg::GraphicsContext::WindowingSystemInterface *ws = osg::GraphicsContext::getWindowingSystemInterface(); unsigned int height=, width=;
osg::GraphicsContext::Traits traits;
osg::GraphicsContext::ScreenIdentifier screenIdentifier1; if (ws)
{
ws->getScreenResolution(screenIdentifier1, width, height);
std::cout << "ws is not null" << std::endl;
std::cout << "resolution: w:"<<width<<" h:"<<height<<" " << std::endl;
std::cout << "border:"<<screenIdentifier1.displayNum << std::endl; }
else
{
std::cout << "ws is null" << std::endl;
} node1 = osgDB::readNodeFile("D:\\参考手册\\BIM\\osg\\build1.OSGB");
viewer->setSceneData(node1.get());
viewer->setUpViewInWindow(, , , , ); osgViewer::Viewer::Windows win1;
osgViewer::Viewer::Windows::iterator iter1; viewer->getWindows(win1);
if (!win1.empty())
{
for (iter1=win1.begin();iter1 != win1.end(); ++iter1)
{
(*iter1)->setWindowDecoration(false);
}
} return viewer->run();
}

osgViewer::Viewer::Windows的更多相关文章

  1. osgViewer:: Viewer::advance() osg多线程与智能指针

    void ViewerBase::frame(double simulationTime) { if (_done) return; // OSG_NOTICE<<std::endl< ...

  2. 《最长的一帧》 osg3.4 osgViewer::View::init() osgViewer::Viewer::getContexts()

    开始:osgViewer/ViewerBase.cpp   389行,startThreading()函数,启动线程   void ViewerBase::startThreading() { if ...

  3. Qt osg QWidget osgViewer::Viewer

    osgViewer::Viewer* _viewer = nullptr; _viewer = new osgViewer::Viewer;osg::ref_ptr<osg::Group> ...

  4. osg for android学习之一:windows下编译(亲测通过)【转】

    1. 首先需要一个OSG for android的环境 (1)NDK 现在Eclipse 对NDK已经相当友好了,已经不需要另外cygwin的参与,具体可以参考 Android NDK开发篇(一):新 ...

  5. osg实例介绍

    osg实例介绍 转自:http://blog.csdn.net/yungis/article/list/1 [原]osgmotionblur例子 该例子演示了运动模糊的效果.一下内容是转自网上的:原理 ...

  6. 向OSG视图Viewer发送消息

    句柄是以下面的方式传递给osgViewer::Viewer的,osgViewer::View.getCamera().setGraphicsContext(osg::GraphicsContext); ...

  7. osgViewer

    /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield * * This library is open source ...

  8. osgViewer应用基础

    #ifdef _WIN32#include <windows.h>#endif#include <osgViewer/Viewer>#include <osgDB/Rea ...

  9. windows消息机制详解(转载)

    消息,就是指Windows发出的一个通知,告诉应用程序某个事情发生了.例如,单击鼠标.改变窗口尺寸.按下键盘上的一个键都会使Windows发送一个消息给应用程序.消息本身是作为一个记录传递给应用程序的 ...

随机推荐

  1. P1078 文化之旅[最短路]

    题目背景 本题是错题,后来被证明没有靠谱的多项式复杂度的做法.测试数据非常的水,各种玄学做法都可以通过(比如反着扫),不代表算法正确.因此本题题目和数据仅供参考. 题目描述 有一位使者要游历各国,他每 ...

  2. 持续集成实践---基于ant+jmeter+jenkins接口CI

    背景: 大纲: jmeter入门教程 jenkins入门教程 ant介绍 jmeter+ant脚本自动执行实践 接口测试CI实践

  3. ajax跨域请求webservice webconfig配置

    <configuration> <system.web> <compilation debug="true" targetFramework=&quo ...

  4. 分页器,序列化组件,bulk_create,choices字段

    分页器 <!--前端--> {% for book in page_queryset %} <p>{{ book.title }}</p> {% endfor %} ...

  5. python - super 寻找继承关系

    """ super 是根据当前类对象的 mro 的继承顺序进行函数的调用的 """ class Base(object): def fn(s ...

  6. / WebAPP开发与小程序 / 步骤一 · 4-5 地图搜索与poi结合(2)

    / WebAPP开发与小程序 / 步骤一 · 4-5 地图搜索与poi结合(2) 在地图中搜索指定对象时,搜索结果可以显示出每个对象的图片,就差这个不会了

  7. vuex的使用介绍

    1.vuex是什么? vuex是一个专为vue.js应用程序开发的状态管理模式(它采用集中式存贮管理应用的所有组件的状态,并以相应的规则保证状态以一种可预测的方式发生变化). 2.vuex的核心概念? ...

  8. OTFS Research Notes

    △f = f·v·cosθ/c,f表示载波频率,5G/B5G朝着毫米波等高频段方向发展,因此多普勒拓展的影响将更显著.此外,Masssive MIMO的现有规模已达256维度,并将朝着上千的规模发展. ...

  9. 三十二. 多表查询 MySQL管理工具 、 用户授权及撤销

    1.MySQL管理工具 部署LAMP+phpMyAdmin平台 安装httpd.mysql.php-mysql及相关包 启动httpd服务程序 解压phpMyAdmin包,部署到网站目录 配置conf ...

  10. NOIP刷题

    搜索 [NOIP2013]华容道 最短路+带剪枝的搜索,是一个思维难度比较大的题目. CF1064D Labyrinth 考虑贪心,用双向队列bfs [NOIP2017]宝藏 剪枝搜索出奇迹 题解:h ...