unsigned int width, height;

//获取系统分辨率
 osg::GraphicsContext::WindowingSystemInterface *wsInterface = osg::GraphicsContext::getWindowingSystemInterface();
  if (!wsInterface)
  {
      return;
  }

wsInterface->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(), width, height);
osg::ref_ptr<osg::GraphicsContext::Traits> traits1 = new osg::GraphicsContext::Traits; traits1->x = ;
traits1->y = ;
traits1->width = width;
traits1->height = height;
traits1->windowDecoration = false;
traits1->doubleBuffer = true;
traits1->sharedContext = ;

osg::GraphicsContext::WindowingSystemInterface Screen Resolution(屏幕分辨率)的更多相关文章

  1. How to get the real screen size(screen resolution) by using js

    How to get the real screen size(screen resolution) by using js 获取用户屏幕的真实像素分辨率, 屏幕实际尺寸 window.deviceP ...

  2. js获取页面宽度高度及屏幕分辨率

    网页可见区域宽:document.body.clientWidth 网页可见区域高:document.body.clientHeight 网页可见区域宽:document.body.offsetWid ...

  3. JS获取浏览器高宽度,屏幕分辨率和一些定位空隙等

    IE中: document.body.clientWidth ==> BODY对象宽度 document.body.clientHeight ==> BODY对象高度 document.d ...

  4. JS获取当前网页大小以及屏幕分辨率等

    网页可见区域宽:document.body.clientWidth 网页可见区域高:document.body.clientHeight 网页可见区域宽:document.body.offsetWid ...

  5. JS获取浏览器信息及屏幕分辨率

    因为vue有自己的生命周期,初始化数据的时候,可以在钩子函数created()函数里初始化数据,也可以在mounted()函数里获取,但是两者是不同的,获取浏览器和屏幕分辨率的时候,不能在create ...

  6. JS对象 屏幕分辨率的高和宽 window.screen 对象包含有关用户屏幕的信息。 1. screen.height 返回屏幕分辨率的高 2. screen.width 返回屏幕分辨率的宽

    屏幕分辨率的高和宽 window.screen 对象包含有关用户屏幕的信息. 1. screen.height 返回屏幕分辨率的高 2. screen.width 返回屏幕分辨率的宽 注意: 1.单位 ...

  7. 在VirtualBox中安装了Ubuntu后,Ubuntu的屏幕分辨率非常小,操作非常不便。通过安装VirtualBox提供的“增强功能组件”,-摘自网络

    在VirtualBox中安装了Ubuntu后,Ubuntu的屏幕分辨率非常小,操作非常不便.通过安装VirtualBox提供的“增强功能组件”,可以解决这一问题,并且使用非常方便. 一.环境 | En ...

  8. 获取Android设备屏幕分辨率

    1.Android 4.3引入的wm工具: a.获取Android设备屏幕分辨率: adb shell wm size b.获取android设备屏幕密度: adb shell wm density ...

  9. C#对屏幕分辨率的操作

    winform应用程序 1.新建Resolution.cs类 using System; using System.ComponentModel; using System.Windows.Forms ...

随机推荐

  1. lvs+keepalived集群架构服务

    一,LVS功能详解 1.1 LVS(Linux Virtual Server)介绍 LVS是Linux Virtual Server 的简写(也叫做IPVS),意即Linux虚拟服务器,是一个虚拟的服 ...

  2. leetcode刷题-1

    小A 和 小B 在玩猜数字.小B 每次从 1, 2, 3 中随机选择一个,小A 每次也从 1, 2, 3 中选择一个猜.他们一共进行三次这个游戏,请返回 小A 猜对了几次? 输入的guess数组为 小 ...

  3. vue 下拉框单选、多选以及默认值

    背景: 单选框和多选框 都是使用了 el-select,但传给后端的值类型不一样,多选框传的值是 list类型: ['value1','value2'] ,单选框传值和其他类型一样:设置默认值也是如此 ...

  4. tomcat启动之后,Chrome浏览器可以访问,IE不行(IE无法访问8080 端口)

    方法简单粗暴,在windows中关闭IE服务,然后再重新安装服务. 请注意,在输入框输入:  http://localhost:8080/myproject 不要直接输入localhost:8080/ ...

  5. Git报错:Please tell me who you are.

    Git在提交的时候报错 Please tell me who you are. 报错 Please tell me who you are. 具体如下: 原因:明确报错.请告诉我你是谁.意思是你在提交 ...

  6. go if for while 的使用

    fileName := "a.txt"contents ,err := ioutil.ReadFile(fileName) if err != nil{ fmt.Println(& ...

  7. [Dart] Dynamic variable in Dart

    First way to create dynamic variable is using 'dymaic' keywrod: dynamic a = 123; a = '123'; Second w ...

  8. P3588 [POI2015]PUS

    好题 思路:线段树优化建图+拓扑DP or 差分约束(都差不多): 提交:3次 错因:眼瞎没看题,Inf写的0x3f3f3f3f 题解: 类似差分约束的模型,\(a<b\rightarrow a ...

  9. Elasticsearch 调优之 shrink

    对于索引分片数量,我们一般在模板中统一定义,在数据规模比较大的集群中,索引分片数一般也大一些,在我的集群中设置为 24.但是,并不是所有的索引数据量都很大,这些小数据量的索引也同样有较大的分片数.在 ...

  10. 三十八. 分库分表概述 配置mycat

    1.搭建mycat 分片服务器   数据库主机 192.168.4.55 使用db1库存储数据 数据库主机 192.168.4.56 使用db2库存储数据 主机 192.168.4.54 运行myca ...