osg學習(三十九)DisplaySettings

2021-10-06 15:58:59 字數 806 閱讀 1810

displaysettings是osg的全域性單例項變數,類似osg的registry。主要記錄視窗的一些顯示設定,比如視窗尺寸、多重紋理取樣數等,osg在建立視窗時會從該變數中讀取資訊,這個變數中的資訊可以通過命令列輸入也可以通過環境變數輸入,但是不支援通過**修改(也可以通過如下方式設定)。這個設定最終會體現在窗體的畫素格式上(osg學習(四十一)win32窗體畫素格式pixelformat

osg::ref_ptr< osg::displaysettings > displaysettings = new osg::displaysettings;

displaysettings->setnummultisamples(16);

this->setdisplaysettings( displaysettings.get());

1、建立時機

osg/displaysettomgs.cpp

osg_init_singleton_proxy(proxyinitdisplaysettings, displaysettings::instance())

osg/object

#define osg_init_singleton_proxy(proxyname, func) static struct proxyname } s_##proxyname;

2、使用方法

osg::displaysettings::instance().get();

隨筆(三十九)

android popupwindow背景半透明相容方案 2.android tint 使用 3.android繪製乙個三角形並且可動態改變顏色 4.android lrecyclerview實現下拉重新整理,滑動到底部自動載入更多 5.在listview的item發生變化的時候 初始化 notif...

GNU make manual 翻譯 三十九

繼續翻譯 3.3 including other makefiles the include directive tells make to suspend reading the current makefile and read one or more other makefiles befor...

Lua程式設計(三十九)

假設有乙個用表來表示集合的模組。該模組還有一些用來計算集合並集和交集等的函式。local set function set.new l local set for v in ipairs l do set v true end return set endfunction set.union a,b...