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();
}

最新文章

  1. XMl.02-约束
  2. Altium Designer 15 --- Design PCB Frame by Rhinoceros
  3. hdu4950 Monster (水题)
  4. andorid lint
  5. C++ Unicode SBCS 函数对照表
  6. java 地址记录
  7. 在virtualenv中安装libxml2和libxslt
  8. DICOM医学图像处理:DCMTK在VS2012中的配置
  9. 当页面加载完成时,JQ触发添加页面的元素的事件触发不了。。
  10. Spark2.1集群安装(standalone模式)
  11. 转深入Java虚拟机 之四:类加载机制
  12. 【转载】Win7利用任务计划程序实现定时关机
  13. Java_并发工具包 java.util.concurrent 用户指南(转)
  14. Python __dict__属性详解
  15. P1080 国王游戏 贪心 高精度
  16. String()与toString的区别
  17. 设置nginx和php-fpm更改上传文件大小限制
  18. 使用InstallAnywhere7.1制作Java exe程序安装包
  19. iOS项目之“返回”手势操作相关
  20. sqlite 判断表中是否包含 某个字段

热门文章

  1. HTTP协议通信原理 与常见报错信息
  2. linux网络编程之posix信号量与互斥锁
  3. Linux下卸载mysql8.x版本
  4. 学到了林海峰,武沛齐讲的Day18 迭代
  5. 学到了林海峰,武沛齐讲的Day16完
  6. MVC 元数据验证
  7. 百度UE编辑器从word粘贴公式
  8. 携程移动端案列(flex布局、背景图缩放,文字阴影)
  9. python 时间等待
  10. org.springframework.expression.spel.SpelEvaluationException: EL1030E